The main back-end processing relies on three CRON jobs that run a various times:
*/5 * * * * /home/cactiuser/scripts/eumetsat_utilisation.sh > /dev/null 2>&1
*/2 * * * * /home/cactiuser/scripts/dfn_monitoring.sh > /dev/null 2>&1
*/1 * * * * /home/cactiuser/scripts/cluster_check.sh > /dev/null 2>&1
*** cluster_check.sh only runs on the Backup Server prod-eumetsat02.geant.net
cluster_check.sh
This calls a PERL script /home/cactiuser/scripts/cluster_check.pl using a single parameter of the IPv4 Address of the primary production instance (62.40.120.236).
In a nutshell, the script tries to Ping the primary server 3 times. If it does not get a response, then it checks for the existence of the /var/lib/dbeacon/EUMET/failover.chk file. If it does not exist, then it creates the file with the contents Process Emails And Alarms. The existence of this file tells the Backup server that it needs to take control of the back-end monitoring.
dfn_monitoring.sh
This calls a PERL script /opt/cacti/scripts/dfn_monitoring_mysql_v2.pl using several parameters e.g:
DFN-Primary DE MN 188.1.200.77 Tcf657bixo 1.3.6.1.4.1.9.10.117.1.1.2.1.17.1.4.232.223.222.1.4.193.17.9.3.32
DFN-Primary - The name of the circuit
DE - The 2 character country code
MN - The 2 character prefix for the MySQL tables
188.1.200.77 - The IPv4 Address of the router
Tcf657bixo - The SNMP Community string of the router
1.3.6.1.4.1.9.10.117.1.1.2.1.17.1.4.232.223.222.1.4.193.17.9.3.32 - The OID used
In a nutshell, the script uses two MySQL tables dbeacon_cacti.MN_ANNOUNCEMENT_CHANNEL and the table name constructed of the table prefix MN, the two character country code and the circuit name, in the example above, the second table would be dbeacon_cacti.MN_DE_DFN-Primary. The script executes an SNMPGet on the router using the specified OID, it compares the value of the counter received from the SNMPGet with the value stored in the dbeacon_cacti.MN_ANNOUNCEMENT_CHANNEL table for the specific circuit name. It uses these values to calculate the circuit utilisation, and stores this value in the circuit specific MySQL table. In addition, it replaces the value of the counter in the dbeacon_cacti.MN_ANNOUNCEMENT_CHANNEL with the new value obtained from the SNMPGet.
If any errors occur, a log file is generated in the /tmp/eumetsat directory
The script then calls two JAVA based batch programs: net.geant.eumetsat.CheckStatus followed by net.geant.eumetsat.CreateMap
eumetsat_utilisation.sh
The script calls four JAVA based batch programs: net.geant.eumetsat.ProcessXML, net.geant.eumetsat.CircuitUtilisation, net.geant.eumetsat.CircuitAvailability and net.geant.eumetsat.DbeaconAvailability
MySQL Database Connections
The Eumetsat back-end processing connects to a MySQL database:
dbeacon_cacti database on eumetsat.geant.net using user eumetsat