Build precise queries to find exactly what you need
Press ESC to close
Nagios World Conference 2026: Sept. 14-17 in St. Paul, MN | Learn More
Your review has been submitted and is pending approval.
Check-Plugin to verify an address registered with dyndns.org (and optionally to update the registered address upon detecting a mismatch!)
Current Version
Last Release Date
February 4, 2010
Owner
Nagios Exchange
Download URL
https://exchange.nagios.org/wp-content/uploads/project-files/2010/02/check_dyndns
This plugin determines the current external address (by checking with checkip.dyndns.org). Then it finds the address known to DNS. If they do not match, there are two possibilites:
1. Just report the problem (as CRITICAL) 2. Correct the problem (if credentials to do so are given) and return as WARNING state.
Dyndns says not to query their checkip-host more often than every ten minutes, therefore a cache file is used to store the last known result and a new query is only done, if the ten minutes have passed (very useful, if you have multiple hostnames registered with dyndns - otherwise just increase the check_interval in nagios).
- Usage: check_dyndns host-to-check [dyndns-credentials] - host-to-check - is the host (e.g. [email protected]) - dyndns-credentials - if present, use these to update the address (format: user:password)
Notes:
* DO NOT put the credentials in the object descriptions or commands! Consider using a $USERxx$ macro for this purpose. * If using a proxy server to access the internet, you can set it in the script at the very beginning (CurlHttpProxy=) * The location of the cache-file can also be changed there (LastCheckFile=)
…can be resolved by replacing `sh` by `bash` in the first line, because [[ is Bash syntax but `sh` may point to a different shell.
hi, i get the following error if i try the script as root user: root@...:/usr/lib/nagios/plugins# ./check_dyndns [email protected] ./check_dyndns: 112: [[: not found ./check_dyndns: 112: [[: not found ./check_dyndns: 112: [[: not found ./check_dyndns: 112: [[: not found cat: /var/cache/nagios/check_dyndnsip.last: Datei oder Verzeichnis nicht gefunden ./check_dyndns: 112: [[: not found ./check_dyndns: 112: [[: not found INTERNAL ERROR: Status code not properly set! [cache: no file] [query: no] if i create the directory /var/cache/nagios/ and empty file /var/cache/nagios/check_dyndnsip.last, the following error appears: root@...:/usr/lib/nagios/plugins# ./check_dyndns [email protected] ./check_dyndns: 112: [[: not found ./check_dyndns: 112: [[: not found ./check_dyndns: 112: [[: not found ./check_dyndns: 112: [[: not found ./check_dyndns: 112: [[: not found ./check_dyndns: 112: [[: not found INTERNAL ERROR: Status code not properly set! [cache: no file] [query: no]
Hi, thanks for your good script. this helped me to code it myself. Thanks! i did some small modification to use a specific DNS as if you run such script behind your dyndns router and the router is a DNS server itself it could not resolve the "wrong" dns... so the Host query section needs a external DNS server. What i did? added in the parameters section this: CurlHttpProxy= DNSServer2use= and in line 74 this: HostResult=`host $DdnsHost $DNSServer2use` now you simply put the IP of a external DNS server into the variable and "host" will use this to place the query to find "definedIP". again: thanks for your good script! cheers Stephan
You must be logged in to submit a review.
To:
From: