sysadmin

Changing NSClient++ configurations in bulk

Posted by Michael Hendrickx on May 11, 2010
sysadmin / 1 Comment

At work, we started using Nagios to monitor the hosts and their services for any issues, so we can, proactively, take actions when we see trouble coming (hard disk that fills up rapidly, restarting services, etc).

Recently we change the Nagios host to another IP address and found ourselves having to change a few dozen NSClient.ini files on the server. Even though we use DNS names as monitoring host (only nsclient access on port 12489/tcp is allowed from a certain host), NSClient by default caches the IP address (Using cache_allowed_hosts, which is set to “1″ by default) so we were bound to change quite some files.

To do this, we have to do the following: Continue reading…

Tags: , , , , ,

Keeping windows services’ running, ghetto style

Posted by Michael Hendrickx on February 24, 2009
sysadmin / No Comments

A small post, but so I can have it as a reference if I ever encouter it again. We’ve setup a Windows 2003 Domain, and run DNS on both the Domain Controllers. We have terrible issues with DNS always shutting down, and disabling itself, so it won’t boot up again.

While we are breaking our heads on how this happens, we made a small two-liner script to enable a Windows service over the command line. We’ve put this in the recovery tab, and scheduled it as a task to run every hour.

The code to enable the DNS service, and to restart the service is below:


sc config DNS start= auto
net start dns

I know it’s very ghetto way of keeping DNS running, but we’re figuring out why DNS always shuts down. Until then, this provides us necesarry DNS uptime ;)

Thanks,
Michael

Tags: , , , , , ,