SMTP - state ok when unavailable

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Wojtek
Posts: 17
Joined: Fri Sep 07, 2018 4:51 am

SMTP - state ok when unavailable

Post by Wojtek »

I would like to monitor one of smtp servers with windows and iis and check status of smtp service.
I use a wizard for this - the TCP/UDP Port Wizard. Everything looks good but I must check that server is not woring (it is test server for DEV).
How I can check and send alert when tcp port 25 will be available?
User avatar
mbellerue
Posts: 1403
Joined: Fri Jul 12, 2019 11:10 am

Re: SMTP - state ok when unavailable

Post by mbellerue »

Just to make sure I understand correctly, you want to check port 25 on a Windows host, and if port 25 is open, Nagios should return critical. Is that correct?

If so, you will have to build a new command for this. We can clone an existing command to make this easier, however. Go to Configure -> Core Config Manager -> Commands, and search for tcp. You will want to create a copy of check_tcp, and edit it.

Let's call the command check_tcp_negate, and we will use this as the command line,

Code: Select all

$USER1$/negate  --ok=CRITICAL --critical=OK --substitute $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$
Then save the new command.

If you already have a host for this server defined, then create a new service that uses this command. Provide 25 as $ARG1$, and if port 25 is closed, the check will return OK.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Wojtek
Posts: 17
Joined: Fri Sep 07, 2018 4:51 am

Re: SMTP - state ok when unavailable

Post by Wojtek »

It works :)

Thank you for your help.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: SMTP - state ok when unavailable

Post by lmiltchev »

I am glad to hear that your issue has been resolved! I am closing this topic now. If you have any further questions/issues, please start a new thread. Thanks!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked