Passive checks from windows

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Passive checks from windows

Post 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
Last edited by dwhitfield on Thu Oct 20, 2016 9:45 am, edited 1 time in total.
Reason: marking with green check mark
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Passive checks from windows

Post 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).
Be sure to check out our Knowledgebase for helpful articles and solutions!
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: Passive checks from windows

Post 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>
paul.jobb
Posts: 167
Joined: Tue Aug 02, 2011 4:37 pm

Re: Passive checks from windows

Post by paul.jobb »

I figured it out, \n does what I was looking for
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Passive checks from windows

Post 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!
Locked