check_external_ip.py

Bookmark and Share

Current Version
2.0
Last Release Date
2012-10-03
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios XI
E-mail
License
GPL
Hits
15616
Files:
FileDescription
check_external_ip.tgzcheck_external_ip.tgz
Checks the external IP dynamically assigned by the service provider and warns on an IP address change.
This plugin is designed for those who need to know the IP address dynamically assigned to them by their service provider. The plugin checks with an external website to find out what public IP address has been assigned by the service providers. The results of the check are stored in a temp file located in /tmp. If the results from the current IP check differs from the pervious results an alert is triggered. These alerts contain the current IP address assigned.

This plugin doesn't require any arguments, and will work for both IPv4 and IPv6 address assignments. It is recommended that the max check attempts be set to 1 for this service check. Failure to do will result is missed alerts when a new IP address is assigned.

*** Update Version 2.0 ***
Added error handling for HTML codes other than 200. If an html error occurs an unknown alert is triggered.