That does sound like an interesting project.
There is not a plugin that I could find that would do what you need so you would have to create some sort of script to achieve what you need.
First, you would have to determine the OID you need to poll from the device to get the coordinates.
An example of the command is as follows
Code: Select all
check_snmp -H $HOSTADDRESS$ -C <communitystring> -o <OIDValue>
What you would have to do is run the custom plugin with an option for where the GPS coordinates should be for the device.
The custom plugin would have to use the scheck_snmp plugin to poll the device and compare the current coordinate with the coordinates provided and if the difference is large enough, you would have the plugin generate an alert.
The check_snmp plugin does have the ability to store a retrieved value and then use subsequence runs to do rate calculation.
--rate
Enable rate calculation. See 'Rate Calculation' below
Rate Calculation:
In many places, SNMP returns counters that are only meaningful when
calculating the counter difference since the last check. check_snmp
saves the last state information in a file so that the rate per second
can be calculated. Use the --rate option to save state information.
On the first run, there will be no prior state - this will return with OK.
The state is uniquely determined by the arguments to the plugin, so
changing the arguments will create a new state file.
It is used for counters. If the OID you are checking returns a string, the rate calculation won't work and you would have to write something for that.