NEOSYS DDNS Service: Difference between revisions
(Created page with "== Using NEOSYS DDNS service == The NEOSYS monitoring server at monitor.neosys.com will update NEOSYS DNS server currently zonedit.com if it is requested to do so by NEOSYS...") |
|||
(19 intermediate revisions by 2 users not shown) | |||
Line 22: | Line 22: | ||
simultaneously on the both old and new servers. | simultaneously on the both old and new servers. | ||
=== | === Using Windows service neosysddns === | ||
This will work even when NEOSYS processes are not running. This is | |||
useful when NEOSYS processes are stopped overnight and when the server | |||
is rebooted, for example for Windows Updates, and NEOSYS processes are | |||
not configured to run automatically after rebooting | |||
==== Starting Windows service on the client server ==== | |||
In NEOSYS maintenance mode | |||
STARTDDNS | |||
Use the commands in [[NEOSYS_DDNS_Service#Troubleshooting_NEOSYS_DDNS_Service|Troubleshooting NEOSYS DDNS Service]] to check if the Client IP is getting updated for the hostname. | |||
==== Stopping the Windows service on the client server ==== | |||
In NEOSYS maintenance mode | |||
STOPDDNS | |||
or you can stop and/or disable the windows service manually | |||
This will NOT stop Nagios based DDNS which has to be done separately. | |||
When you run the above command in Maintenance you will get a reminder to stop nagios based ddns. See section below. | |||
=== Nagios based DDNS === | === Nagios based DDNS === | ||
This will | NAGIOS can update NEOSYS ddns entries (currently on zoneedit) automatically as by product of the processing of NAGIOS server updates from NEOSYS processes running on the client server. This is done independently and in parallel to the NEOSYSDDNS service which runs on NEOSYS servers. | ||
=== Automatic Nagios based DDNS === | |||
This will occur if a special file exists on the NAGIOS server. This file is automatically created when STARTDDNS has been run on the NEOSYS server, or can be created manually. | |||
Therefore, if you are running NEOSYSDDNS service on the NEOSYS server, DDNS will be ALSO be done in parallel by Nagios. This is useful as a backup for example in the case where the NEOSYSDDNS service has to be stopped on the NEOSYS server eg while Cygwin updates are being processed. | |||
To see what hosts are subject to automatic Nagios based DDNS. | |||
ll /var/lib/neosysddns | |||
=== Manually starting Nagios based DDNS === | |||
If you need to switch on DDNS service for some reason but cannot get to the NEOSYS server to do so, then you can request Nagios to perform DDNS by creating a special file in the NAGIOS server as follows: | |||
touch /var/lib/neosysddns/xxxxxxxx.client | |||
chmod a+rw /var/lib/neosysddns/xxxxxxxx.client | |||
=== Stopping Nagios based DDNS === | |||
If you need to stop DDNS being done by NAGIOS after either automatically or manually starting it as above, you must remove a special file in the NAGIOS server as follows. Note that running STOPDDNS in the NEOSYS server does NOT remove the special file on NAGIOS server, so just running STOPDDNS in the NEOSYS server will NOT stop the parallel NAGIOS server updating DDNS. Therefore if you wish complete cessation of DDNS service for a hostname you will have to do this step AS WELL. | |||
rm /var/lib/neosysddns/xxxxxxxx.client | |||
=== Configuring neosysddns on monitor.neosys.com === | |||
The configuration of NEOSYS DDNS service on nagios i.e monitor.neosys.com can be controlled as follows: | |||
Remember that this is the neosysddns service on monitor.neosys.com and NOT the windows service on the server with dynamic ip no. | |||
neosysddns logging level may be configured NOT to show every DDNS update check if the IP no hasn't changed to save log file space since the neosysddns windows servers triggers every minute. | |||
Configuration File: /etc/nagios3/conf.d/ddnsconf.py | |||
nano /etc/nagios3/conf.d/ddnsconf.py | |||
To see all the configuration options see comments in the file. | |||
To change the logging level you can edit the option "lognotchanged" and set it to "lognotchanged = False" so that every DDNS update check is not logged to save log file space. By default it is set to true. | |||
is | |||
You can alter another option "lognthresquest" which logs every nth incoming request i.e. if it is set to 1000 it will log every 1000th request. You can set it to 5 or 10 to check if the ddns is working when lognotchanged is set to False. By default this option is set to "0". | |||
Make the necessary changes, then save and close the configuration file and then restart neosysddns service using the below command: | |||
sudo service neosysddns restart | |||
Other NEOSYS DDNS service commands are: | |||
sudo service neosysddns stop | |||
sudo service neosysddns start | |||
sudo service neosysddns status | |||
All service commands with the exception of status show nothing if successful or error message if not. | |||
== Troubleshooting NEOSYS DDNS Service == | == Troubleshooting NEOSYS DDNS Service == | ||
Line 67: | Line 110: | ||
On nagios/monitor server to see recent ddns updates for a hostname "XXXX" whatever is entered as System ID in System configuration file. | On nagios/monitor server to see recent ddns updates for a hostname "XXXX" whatever is entered as System ID in System configuration file. | ||
grep | journalctl|grep -i ddns|grep XXXX | ||
or | or to watch new ddns updates as they come in | ||
journalctl -f | grep -i ddns | |||
Lines containing ddns.py are the result of NEOSYS Windows service. Lines containing apache2 are the result of nagios updates. e.g as shown below: | or to watch new ddns updates as they come in for xxxxxxxx | ||
journalctl -f | grep -i ddns | grep xxxxxxxx | |||
Lines containing ddns.py are the result of NEOSYS Windows service. | |||
Lines containing apache2 are the result of nagios updates. e.g as shown below: | |||
Jan 28 00:03:04 monitor apache2: DDNS IP_NO ums <SUCCESS CODE="200" TEXT="XXXX.hosts.neosys.com updated to 82.178.63.35" ZONE="XXXX.hosts.neosys.com"> | Jan 28 00:03:04 monitor apache2: DDNS IP_NO ums <SUCCESS CODE="200" TEXT="XXXX.hosts.neosys.com updated to 82.178.63.35" ZONE="XXXX.hosts.neosys.com"> | ||
Jan 28 01:54:26 monitor ddns.py: DDNS IP_NO 4481 "ddns XXXX" No. 11327 was 82.178.63.35 <SUCCESS CODE="200" TEXT="XXXX.hosts.neosys.com updated to 85.154.7.138" ZONE="XXXX.hosts.neosys.com"> | Jan 28 01:54:26 monitor ddns.py: DDNS IP_NO 4481 "ddns XXXX" No. 11327 was 82.178.63.35 <SUCCESS CODE="200" TEXT="XXXX.hosts.neosys.com updated to 85.154.7.138" ZONE="XXXX.hosts.neosys.com"> | ||
Working/Status Files | |||
ll /var/lib/neosysddns/ | |||
ll /var/lib/neosysddns/ignored | |||
Hosts that have been seen by Nagios but were ignored because the xxxxxxxx.client file was not present in /var/lib/neosysddns | |||
ll /var/lib/neosysddns/ignored |
Latest revision as of 06:36, 26 June 2016
Using NEOSYS DDNS service
The NEOSYS monitoring server at monitor.neosys.com will update NEOSYS DNS server currently zonedit.com if it is requested to do so by NEOSYS installations. NEOSYS installations do that automatically when updating Nagios and can also have a Windows service configured to do it at all times.
Normally this would only be used at NEOSYS installations that have a dynamic ip number ie do not have a static ip number.
This is not required generally at client installations with static ip numbers or NEOSYS win3/win4 installations but it MAY be used in that situation too to provide for automatic change of static DNS for example to cater for:
- migration from old server to new server
- moving to backup servers
- moving back to live servers
- moving between client's own server and NEOSYS hosts on win3/win4.
Care will be needed to ensure that the DDNS service is not running simultaneously on the both old and new servers.
Using Windows service neosysddns
This will work even when NEOSYS processes are not running. This is useful when NEOSYS processes are stopped overnight and when the server is rebooted, for example for Windows Updates, and NEOSYS processes are not configured to run automatically after rebooting
Starting Windows service on the client server
In NEOSYS maintenance mode
STARTDDNS
Use the commands in Troubleshooting NEOSYS DDNS Service to check if the Client IP is getting updated for the hostname.
Stopping the Windows service on the client server
In NEOSYS maintenance mode
STOPDDNS
or you can stop and/or disable the windows service manually
This will NOT stop Nagios based DDNS which has to be done separately.
When you run the above command in Maintenance you will get a reminder to stop nagios based ddns. See section below.
Nagios based DDNS
NAGIOS can update NEOSYS ddns entries (currently on zoneedit) automatically as by product of the processing of NAGIOS server updates from NEOSYS processes running on the client server. This is done independently and in parallel to the NEOSYSDDNS service which runs on NEOSYS servers.
Automatic Nagios based DDNS
This will occur if a special file exists on the NAGIOS server. This file is automatically created when STARTDDNS has been run on the NEOSYS server, or can be created manually.
Therefore, if you are running NEOSYSDDNS service on the NEOSYS server, DDNS will be ALSO be done in parallel by Nagios. This is useful as a backup for example in the case where the NEOSYSDDNS service has to be stopped on the NEOSYS server eg while Cygwin updates are being processed.
To see what hosts are subject to automatic Nagios based DDNS.
ll /var/lib/neosysddns
Manually starting Nagios based DDNS
If you need to switch on DDNS service for some reason but cannot get to the NEOSYS server to do so, then you can request Nagios to perform DDNS by creating a special file in the NAGIOS server as follows:
touch /var/lib/neosysddns/xxxxxxxx.client chmod a+rw /var/lib/neosysddns/xxxxxxxx.client
Stopping Nagios based DDNS
If you need to stop DDNS being done by NAGIOS after either automatically or manually starting it as above, you must remove a special file in the NAGIOS server as follows. Note that running STOPDDNS in the NEOSYS server does NOT remove the special file on NAGIOS server, so just running STOPDDNS in the NEOSYS server will NOT stop the parallel NAGIOS server updating DDNS. Therefore if you wish complete cessation of DDNS service for a hostname you will have to do this step AS WELL.
rm /var/lib/neosysddns/xxxxxxxx.client
Configuring neosysddns on monitor.neosys.com
The configuration of NEOSYS DDNS service on nagios i.e monitor.neosys.com can be controlled as follows:
Remember that this is the neosysddns service on monitor.neosys.com and NOT the windows service on the server with dynamic ip no.
neosysddns logging level may be configured NOT to show every DDNS update check if the IP no hasn't changed to save log file space since the neosysddns windows servers triggers every minute.
Configuration File: /etc/nagios3/conf.d/ddnsconf.py
nano /etc/nagios3/conf.d/ddnsconf.py
To see all the configuration options see comments in the file.
To change the logging level you can edit the option "lognotchanged" and set it to "lognotchanged = False" so that every DDNS update check is not logged to save log file space. By default it is set to true.
You can alter another option "lognthresquest" which logs every nth incoming request i.e. if it is set to 1000 it will log every 1000th request. You can set it to 5 or 10 to check if the ddns is working when lognotchanged is set to False. By default this option is set to "0".
Make the necessary changes, then save and close the configuration file and then restart neosysddns service using the below command:
sudo service neosysddns restart
Other NEOSYS DDNS service commands are:
sudo service neosysddns stop sudo service neosysddns start sudo service neosysddns status
All service commands with the exception of status show nothing if successful or error message if not.
Troubleshooting NEOSYS DDNS Service
On nagios/monitor server to see recent ddns updates for a hostname "XXXX" whatever is entered as System ID in System configuration file.
journalctl|grep -i ddns|grep XXXX
or to watch new ddns updates as they come in
journalctl -f | grep -i ddns
or to watch new ddns updates as they come in for xxxxxxxx
journalctl -f | grep -i ddns | grep xxxxxxxx
Lines containing ddns.py are the result of NEOSYS Windows service.
Lines containing apache2 are the result of nagios updates. e.g as shown below:
Jan 28 00:03:04 monitor apache2: DDNS IP_NO ums <SUCCESS CODE="200" TEXT="XXXX.hosts.neosys.com updated to 82.178.63.35" ZONE="XXXX.hosts.neosys.com"> Jan 28 01:54:26 monitor ddns.py: DDNS IP_NO 4481 "ddns XXXX" No. 11327 was 82.178.63.35 <SUCCESS CODE="200" TEXT="XXXX.hosts.neosys.com updated to 85.154.7.138" ZONE="XXXX.hosts.neosys.com">
Working/Status Files
ll /var/lib/neosysddns/ ll /var/lib/neosysddns/ignored
Hosts that have been seen by Nagios but were ignored because the xxxxxxxx.client file was not present in /var/lib/neosysddns
ll /var/lib/neosysddns/ignored