Nagios and checking websites

Hailing to all of you dragons,

I got little idea and need little help. Webmin && Virtualmin are both parsing configuration files the right way. Using regex and are respecting RFC in config files.

My idea is to let my secondary MX and DNS server - which is configured in server index in first server to let it check all websites using nagios - it is as simple as few lines into server.cfg for nagios - only one file but on remote server (and with some parametesr).

Can anyone advise me where should I start? Which files - I think it would be procedure simmilar to adding or removing secondary postfix MX hold records on secondary server. So if I will modifie this procedure a little bit I should be there nope ?

Thanks for any advice and I hope this will help to someone from community too when will be done.


What are you trying to do exactly?

I can say that you certainly don’t want to modify Virtualmin or Webmin directly…you probably either want to create a new plugin module, or write a script that does what you want and have Virtualmin call it when making changes to a virtual server (there’s an option for running a command when making changes, and the script has access to all the details you’d need, like domain name, IP address, etc.

I know that everything should be done by plugin or script I know little bit about software development for now.

It should work like BIND is adding secondary MX record at secondary MX server.

I want to monitor websites setuped by virtualmin from secondary DNS and MX server by Nagios monitoring system which has http_check plugin.
This plugin is able to send status of website to central Nagios logic and notify me about any warnings or critical states it is supporting strings/regexes in website content which should or shouldn’t be present there.

I just wanted to know where to start looking for simmilar procedure.

I think that changing remote MX records and restarting BIND is very similar to this process as I would like to add just some lines into one configuration file and restart/reload Nagios.