TCP check more than one port under one service config?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ikekim
Posts: 85
Joined: Wed Aug 16, 2017 12:21 pm

TCP check more than one port under one service config?

Post by ikekim »

Hi,

When I create a service to check_tcp, I know I can use "-p 80" for $ARG1$, but would I be able to check multiple ports using the $ARG1$ parameter or $ARG2$?

$USER1$/check_tcp -H $HOSTADDRESS$ $ARG1$ and when I use "-p 80" for $ARG1$ parameter, it runs the command
$ /usr/local/nagios/libexec/check_tcp -H 10.155.58.26 -p 80

So this is good, but how can I configure to check multiple ports if that is possible.


thanks,
ik.
bolson

Re: TCP check more than one port under one service config?

Post by bolson »

I'm sorry, that's not possible. The command takes only one argument for port number. You would check multiple ports by configuring multiple instances of the check command.
ikekim
Posts: 85
Joined: Wed Aug 16, 2017 12:21 pm

Re: TCP check more than one port under one service config?

Post by ikekim »

Okay thanks for the response.

Perhaps, I can write my own plugin?..where would be a good place to learn about writing and creating you own customized plugin?


thanks.
bolson

Re: TCP check more than one port under one service config?

Post by bolson »

Here's a link to a tutorial on creating a plugin using bash.

Enjoy!
ikekim
Posts: 85
Joined: Wed Aug 16, 2017 12:21 pm

Re: TCP check more than one port under one service config?

Post by ikekim »

@bolson,

where is the link?

thanks.
ikekim
Posts: 85
Joined: Wed Aug 16, 2017 12:21 pm

Re: TCP check more than one port under one service config?

Post by ikekim »

Thank you for the link.

I will see how fun this is going to be or not going to be...


ik
dwasswa

Re: TCP check more than one port under one service config?

Post by dwasswa »

Thanks @ bolson.

@ikekim,let us know how it goes.
Locked