check_nrpe + indirect checks shown on wrong host


#1

Hi,

First: maybe I’m missing something obvious, since I’m fairly new to Nagios.

I’ve setup a Nagios installation which is monitoring several Linux servers and one Windows server using respectively NRPE and NSClient++ (and some regular checks like check_http). One of the Linux servers is running postfix with MailScanner and the Windows server is running Exchange 2007. I’ve got the internal monitoring working great, but I want to keep an eye on my Exchange server - especially the receiving bit.

Since the Exchange SMTP server is configured to only accept e-mail from the MailScanner machine, I have to run the check_smtp from the MailScanner. It’s possible to do this through ‘indirect checks’, according to the NRPE documentation and indeed, that’s working. The only problem is: I have to add the check to the MailScanner machine - meaning that the status will show up under the MailScanner host. Is there any way to get the indirect check show up under the Exchange host? Using arguments ($ARG1$) instead of the hostaddress ($HOSTADDRESS$) and passing the MailScanner IP as $ARG1$ doesn’t seem to work (ending up in errors from check_smtp, saying it’s used incorrect).

The reason I really want to change this, is that this can easily lead to loss of service: our MailScanner machines are redundant (using multiple MX records) but our Exchange isn’t. If someone would interpret a notification incorrect, it could be decided not to act upon it immediatly but leave it till working hours (for example) - thereby delaying important e-mail.

Thanks for any help on this.


#2

it COULD possibly work with check_by_ssh. it’s usually used to make local checks on remote machines, but possibly you could get it to launch the check_smtp command on the remote machine… if you create the command correctly it shouldn’t be difficult to have it appear under your windows hsot even if the check is executed on the mail scanner server. If it works i’d create a dependency between the services… if for any reason the mail scanner server doesn’t work correctly you’d get an error on the windows host which isn’t truly related to that :slight_smile:


#3

Good idea, although that causes (imo) unnecessary overhead. I’ll look into it, thanks for the suggestion.