how can monitor MQ with nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
baber
Posts: 295
Joined: Wed Oct 21, 2015 4:39 am

Re: how can monitor MQ with nagios

Post by baber »

excuse me i have many searched on net and doc but could not anything clearly can you explain more

for example if i add this line to command.cfg

Code: Select all

define command {
       command_name                             notify-host-by-tcp
       command_line                             /usr/local/nagios/libexec/yourscript $NOTIFICATIONTYPE$ $HOSTNAME$ $HOSTSTATE$ $HOSTADDRESS$ $HOSTOUTPUT$ $LONGDATETIME$
}
please help me about script i have some script here would you see these scripts ? and do you think which of them is better for me ?

https://exchange.nagios.org/directory/P ... Generic%29

2 - there is not any plugin or ..... for send notification as string txt to a define host with define port number ?

Please help me i am so confused and this is so important for me just send notification as string txt to a define host on tcp port number

so thanks
Best regards
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: how can monitor MQ with nagios

Post by rkennedy »

The scripts you linked are to do TCP / UDP checks. They are not any plugins for sending data as a notification.

Can you please outline what you're trying to accomplish?
Former Nagios Employee
baber
Posts: 295
Joined: Wed Oct 21, 2015 4:39 am

Re: how can monitor MQ with nagios

Post by baber »

i just want the alaram for example i have attached it send from nagios server(10.0.0.0) to the other server(10.0.0.1) on a define port number (tcp port )


Best regards
Babak
Attachments
alarm.jpg
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: how can monitor MQ with nagios

Post by Box293 »

baber wrote:on a define port number (tcp port )
Can you explain this in more detail.
What port number?
Is there a specific application listening?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
baber
Posts: 295
Joined: Wed Oct 21, 2015 4:39 am

Re: how can monitor MQ with nagios

Post by baber »

On My second server is a listener when send a string txt on port 8899 it will automatically send that string to my mobile number i just want send that alaram appear on nagios page to second server on port8899

Please help me
So thanks

Best regards
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: how can monitor MQ with nagios

Post by rkennedy »

Can you write a script that sends to the data to port 8899? This is what needs to be done. As stated above, here's the information you will need to pass to your script, which will send it -

Code: Select all

$NOTIFICATIONTYPE$ $HOSTNAME$ $HOSTSTATE$ $HOSTADDRESS$ $HOSTOUTPUT$ $LONGDATETIME$
Former Nagios Employee
baber
Posts: 295
Joined: Wed Oct 21, 2015 4:39 am

Re: how can monitor MQ with nagios

Post by baber »

There is not any script for do this job?

Have to write new script?
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: how can monitor MQ with nagios

Post by Box293 »

Unfortunately it appears you have to write your own script. This is the power of Nagios, it allows you to do what you want HOWEVER some things require you to create the scripts to do them.

You could try looking on the Nagios Exchange for such a script that someone else has already written:
https://exchange.nagios.org/
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
baber
Posts: 295
Joined: Wed Oct 21, 2015 4:39 am

Re: how can monitor MQ with nagios

Post by baber »

my problem is :

now nagios can send notification or alarm to mail server now i want send alaram to other server except mail server

can do it ?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: how can monitor MQ with nagios

Post by rkennedy »

Sure, you should be able to use event _handlers which are triggered every time a state changes (OK -> WARNING, WARNING -> OK, OK -> CRIT, CRIT -> OK, etc.)

You can have it run a script of your own whenever one of those changes, here's a bit more info about event handlers -
https://assets.nagios.com/downloads/nag ... dlers.html
Former Nagios Employee
Locked