Monitoring Data Synchronizer using SNMP (like MRTG)

0 Likes
You can graph the actual number of connected devices to your Data Synchronizer server(s) using a standard SNMP tool like MRTG (Multi Router Traffic Grapher), see: http://oss.oetiker.ch/mrtg/. MRTG is part of the software portfolio of your OES/SUSE Server. Just use YaST to install and configure it.

  1. On your Data Synchronizer Server install & configure the product "net-snmp".

  • Open the firewall for 161 UDP (just for your monitoring machine)

  • Allow access by adding a line like

    rocommunity public IPAddressOfMonitoringMachine

    to "/etc/snmp/snmpd.conf"

  • Create a script "/root/bin/con.sh" like this:

    #!/bin/sh
    LINES=$(/bin/netstat -an | /bin/grep -c ':443' )
    echo $LINES
    exit $LINES

     

  • Make it executable
    chmod  x /root/bin/con.sh


  • Add an "exec" statement to the "/etc/snmp/snmpd.conf" using a free/unused OID (you can use the one in this example).

    exec 1.3.6.1.4.1.2021.8.1.100 /root/bin/con.sh

     

  • Restart the snmpd
    rcsnmpd restart



Now you are ready to test it. Enter the following command on the Data Synchronizer Server
snmpwalk -Os -c public -v 1 localhost 1.3.6.1.4.1.2021.8.1.100

You should get the number of devices, like:
extResult.1 = INTEGER: 73

Finally add a new section to your mrtg.cfg (or whatever tool you might use):

Target[DataSyncServer.cc]: 1.3.6.1.4.1.2021.8.1.100.1&1.3.6.1.4.1.2021.8.1.100.1:public@DataSyncServer
Title[DataSyncServer.cc]: DataSyncServer - Connected Devices
PageTop[DataSyncServer.cc]: <H1>DataSyncServer - Connected Devices</H1>
MaxBytes[DataSyncServer.cc]: 250
ShortLegend[DataSyncServer.cc]: %
YLegend[DataSyncServer.cc]: Connected Devices
Legend1[DataSyncServer.cc]: Connected Devices
LegendI[DataSyncServer.cc]: Connected
LegendO[DataSyncServer.cc]:
Options[DataSyncServer.cc]: gauge,growright,nopercent,noinfo
Unscaled[DataSyncServer.cc]: ymwd

 

Labels:

How To-Best Practice
Comment List
Related
Recommended