Page 1 of 1

Passive checks from windows

Posted: Wed Sep 21, 2016 11:51 am
by paul.jobb
Hi;

I was wondering what the best approach for the following.

One of our exchange administrators has developed a powershell script to test mailflow across a number of servers, from what I understand it takes about 6 minutes to run so it seems best to configure it to passively update the status into nagios. I would most likely just schedule it using windows scheduled tasks what is the easiest method for updating nagios with the output? ncpa, nsca or nrpe? command line utility? update via a web URL?

Thanks,
Paul

Re: Passive checks from windows

Posted: Wed Sep 21, 2016 11:58 am
by lmiltchev
Your best bets would be to use either NSCA with NSClient++ (where NSClient++ will schedule the passive checks) or NRDS (where checks will be scheduled via the Windows Task Scheduler).

Re: Passive checks from windows

Posted: Wed Oct 19, 2016 4:01 pm
by paul.jobb
with nrds how would I format the xml If I wanted to include long service output as part of the output, the below doesn't seem to import my extra information

<?xml version='1.0'?>
<checkresults>
<checkresult type='service'>
<hostname>Email Service</hostname>
<servicename>Mail Flow</servicename>
<state>0</state>
<output>OK: Mail Flow test completed succesfully test|mailboxes=160
long service output line 1
long service output line 2
</output>
</checkresult>
</checkresults>

Re: Passive checks from windows

Posted: Wed Oct 19, 2016 4:57 pm
by paul.jobb
I figured it out, \n does what I was looking for

Re: Passive checks from windows

Posted: Thu Oct 20, 2016 9:44 am
by dwhitfield
Glad to hear it is resolved. I am going to lock the thread. Please feel free to post again if you have you another issue. Thank you for using the Nagios forums!