E-Monitoring notes: Difference between revisions

From JCWiki
Jump to navigation Jump to search
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
= isys =
= isys =
Isys provides a website for viewing the data collected by Magrathea.  It also runs the mysql database that holds the data.
Isys provides a website for viewing the data collected by Magrathea.  It also runs the mysql database that holds the data.
(website and database now on magrathea2).  email for gas updates still on isys.


It also runs mail for e-monitoring.net
It also runs mail for e-monitoring.net
Line 29: Line 30:


= polling / magrathea =  
= polling / magrathea =  
Magrathea polls the wells every 5 minutes.  It logs the raw data in a local file (el1, el2, el3, el4).  It then applies a correction factor and inserts the data into a database on Isys.
Magrathea polls the wells every 5 minutes.  It   getit.pl uses the expect script poll.exp to get the data from the logger and log the raw data in a local file (el1, el2, el3, el4). getit.pl then applies a correction factor and inserts the data into a database on Isys.
 
The website http://gwsci.e-monitoring.net is also hosted on isys.
 
Magrathea2 polls the wells every 5 minutes by calling getit.pl from the crontab.  getit.pl uses the perl routine poll to get the data from the new style loggers and log the raw data in a local file (el1, el2, el3, el4).  getit.pl then applies a correction factor and inserts the data into a database on magrathea2. 
 
The website http://gwsci2.e-monitoring.net is also hosted on magrathea2.
   
   
== Current IP addresses ==
== Current IP addresses ==
IP address are located here
Current IP addresses in Texas are located here
   [[Private_IP_Mapping#Ground_Water_in_Texas]]
   [[Private_IP_Mapping#Ground_Water_in_Texas]]


=== Public IPs in Texas ===
== Cisco 3750 Port Configuration ==
 
The following is the configuration for the ports on the Cisco 3750.
 
<pre>
Port  1 - 2  el1
Port  3 - 4  el2
port  5 - 6  el3
port  7 - 8  el4
port  9 - 10 unused
port 11 - 12 NAT box internal blue ports
 
port 13 - 14 reserved for 10.1.2.61 address
port 15 - 24 external WAN switch ports (Adtran ethernet, NAT external ethernet, Digi, Remote Power Controller, etc.)
</pre>
 
== D-link NAT Box Configuration ==
 
The NAT box has IP address 70.165.211.76 and maps the following ports to internal usage.
<pre>
<pre>
72.165.211.72 Network Address (unusable)
port 443  NAT https:// mgmt port
72.165.211.73 Gateway (default router)
port 4001 el1 logger
72.165.211.74 Digibox (Etherlite)
port 4002 el2 logger
72.165.211.75 Remote Power Controller
port 4003 el3 logger
72.165.211.76 D-Link NAT box
port 4004 el4 logger
72.165.211.77 Cisco 3750
port 8023 Cisco switch telnet
72.165.211.78  (unused)
72.165.211.79  Broadcast Address (unusable)
</pre>
</pre>



Latest revision as of 10:52, 26 August 2018

isys[edit]

Isys provides a website for viewing the data collected by Magrathea. It also runs the mysql database that holds the data. (website and database now on magrathea2). email for gas updates still on isys.

It also runs mail for e-monitoring.net

the key on root@mail should let you ssh w/o pass to isys.e-monitoring.net

isys has a mail queue problem where it gets big and we run out of inodes. we setup a cronjob to clear that out.

isys - out of inodes[edit]

  1. ssh to root@isys.e-monitoring.net
  2. isys# cd /var/spool/mqueue
  3. isys# sh
  4. # for f in `ls`; do rm $f; done
(wait awhile)
	wrote a script:

	isys# cat > /root/clearqueue.sh
	#!/bin/sh
	for f in `ls /var/spool/mqueue`; do rm /var/spool/mqueue/$f; done
	isys# sh /root/clearqueue.sh


crontabed for 3am on the 1st of the month

polling / magrathea[edit]

Magrathea polls the wells every 5 minutes. It getit.pl uses the expect script poll.exp to get the data from the logger and log the raw data in a local file (el1, el2, el3, el4). getit.pl then applies a correction factor and inserts the data into a database on Isys.

The website http://gwsci.e-monitoring.net is also hosted on isys.

Magrathea2 polls the wells every 5 minutes by calling getit.pl from the crontab. getit.pl uses the perl routine poll to get the data from the new style loggers and log the raw data in a local file (el1, el2, el3, el4). getit.pl then applies a correction factor and inserts the data into a database on magrathea2.

The website http://gwsci2.e-monitoring.net is also hosted on magrathea2.

Current IP addresses[edit]

Current IP addresses in Texas are located here

 Private_IP_Mapping#Ground_Water_in_Texas

Cisco 3750 Port Configuration[edit]

The following is the configuration for the ports on the Cisco 3750.

Port  1 - 2  el1 
Port  3 - 4  el2
port  5 - 6  el3
port  7 - 8  el4
port  9 - 10 unused
port 11 - 12 NAT box internal blue ports

port 13 - 14 reserved for 10.1.2.61 address
port 15 - 24 external WAN switch ports (Adtran ethernet, NAT external ethernet, Digi, Remote Power Controller, etc.)

D-link NAT Box Configuration[edit]

The NAT box has IP address 70.165.211.76 and maps the following ports to internal usage.

port  443  NAT https:// mgmt port
port  4001 el1 logger
port  4002 el2 logger
port  4003 el3 logger
port  4004 el4 logger
port  8023 Cisco switch telnet

config new IP[edit]

Edit:

/etc/defaultrouter
/export/home/groundwater/bin/getit.pl
/etc/hosts
/etc/hostname.le1

On production:

/home/htdocs/gw/index.pl
/home/htdocs/isys/pollscan.pl
/home/gw/shipley/etc/config.pl
/home/gw/owrd/etc/config.pl
/home/dboodman/www/isys/pollscan.pl
Apache conf

stop it from trying to dial out[edit]

mysql> select * from resources;
+------------+------------+----------------+-------+---------+----------+
| resourceID | resource   | connectionType | inUse | inUseBy | inUseFor |
+------------+------------+----------------+-------+---------+----------+
|          1 | /dev/cuaa0 |              1 |  NULL |    NULL |     NULL |
|          2 | network    |              2 |  NULL |    NULL |     NULL |
|          3 | network    |              2 |  NULL |    NULL |     NULL |
|          4 | network    |              2 |  NULL |    NULL |     NULL |
|          5 | network    |              2 |  NULL |    NULL |     NULL |
|          6 | network    |              2 |  NULL |    NULL |     NULL |
|          7 | network    |              2 |  NULL |    NULL |     NULL |
|          8 | network    |              2 |  NULL |    NULL |     NULL |
|          9 | network    |              2 |  NULL |    NULL |     NULL |
|         10 | network    |              2 |  NULL |    NULL |     NULL |
|         11 | network    |              2 |  NULL |    NULL |     NULL |
+------------+------------+----------------+-------+---------+----------+
11 rows in set (0.00 sec)
delete from resources where resourceID =1;