Pages: [1]   Go Down
Author Topic: Last contact alert [FIXED]  (Read 668 times)
0 Members and 3 Guests are viewing this topic.
daniels
Smart member
*****

Karma: 19
Offline Offline

Posts: 205



View Profile
« on: April 28, 2011, 05:12:41 PM »

Is it possible to send an alert when the module is not responding?

I need to remote check if the ssh service in the remote machine is up and alert when it is down. The problem is that when it is down, it is unresponsive, so the state remains the same and I got no alerts...

An example attached.

Regards.


* pandora.JPG (30.74 KB, 780x229 - viewed 24 times.)
« Last Edit: June 20, 2011, 04:14:19 PM by tpalacios » Logged

Luismi
Global Moderator
Sr. Member
*****

Karma: 6
Offline Offline

Posts: 153



View Profile
« Reply #1 on: May 11, 2011, 07:38:20 PM »

Hi daniels, sorry for the delay

You can do it assigning the same alert to the Keepalive module.

Cheers.
Logged

daniels
Smart member
*****

Karma: 19
Offline Offline

Posts: 205



View Profile
« Reply #2 on: May 13, 2011, 03:38:56 PM »

Hi Luismi.

  No problem for the delay.


    About the error, No, I can't assigning to the Keepalive module, because the keepalive remains ok. Only this module did not receive an answer. (in this case, the server is frozen, but the network card stills answer a ping from the pandora server).
Logged

tpalacios
Administrator
Sr. Member
*****

Karma: 8
Offline Offline

Posts: 190


The Game


View Profile
« Reply #3 on: May 14, 2011, 03:52:33 PM »

Hi daniels.

Let me help you this time. :)

Correct me if I'm wrong:

1) The value you're trying to monitor is a string, so I guess the module type you're using is a generic_data_string right?

2) The problem with strings is that it's difficult to define useful alerts with them... the only way is to add an On Change alert, in case the module always has the same value when it is ok... and alert when it changes... but with the method you're trying to check the ssh service remotely, you probably get nothing when the service is down... therefore the module returns nothing...

You can try setting up a plugin server with a script that performs another kind of check to gather info about the status of the remote ssh service.

I'll get back to you ASAP with more info about it... I don't have the tools to check it for you right now.

Greetings.
Logged

tpalacios
Administrator
Sr. Member
*****

Karma: 8
Offline Offline

Posts: 190


The Game


View Profile
« Reply #4 on: May 16, 2011, 11:04:13 AM »

Some additional info regarding the TCP Send and TCP Receive fields defined in your module would be great.

Anyways, another solution to your problem would be creating an alert which fires when the module is in unknown status (which should be your case)

That way, everytime the SSH check module stops sending info, the alert will be fired.

Greetings.
Logged

aitor
Sr. Member
****

Karma: 2
Offline Offline

Posts: 129


View Profile
« Reply #5 on: May 17, 2011, 08:43:20 AM »

I not sure that it's this what you want to do. But you can do it, creating a template, and in this template, the condition, would be "unknown state".
Logged

tpalacios
Administrator
Sr. Member
*****

Karma: 8
Offline Offline

Posts: 190


The Game


View Profile
« Reply #6 on: May 17, 2011, 09:24:16 AM »

I not sure that it's this what you want to do. But you can do it, creating a template, and in this template, the condition, would be "unknown state".

Yes, thank you for explaining it clearly. That is what I was trying to say. ;)
Logged

aitor
Sr. Member
****

Karma: 2
Offline Offline

Posts: 129


View Profile
« Reply #7 on: May 17, 2011, 09:30:58 AM »

Sorry, I didn't read your last post.
Logged

tpalacios
Administrator
Sr. Member
*****

Karma: 8
Offline Offline

Posts: 190


The Game


View Profile
« Reply #8 on: May 17, 2011, 01:08:10 PM »

No problem, you've used a resumed and better defined post to describe the solution.

Merit is yours too... help is always welcome, no matter if it comes twice. ;)

Greetings.
Logged

daniels
Smart member
*****

Karma: 19
Offline Offline

Posts: 205



View Profile
« Reply #9 on: May 17, 2011, 01:26:52 PM »

Hi guys.



   Sorry for the late response, and for this long post ;-)





   1) I'm monitoring the ssh of the server. The actual answer is a string, but I could easily adapt to a value. Unfortunately, this not solve the problem because the status remain unknown.



   2) Yes, strings are hard and I usually monitor them with the "on change" alert. :-) (good tip)





    I tried to set up the plug-in server too. This took me a lot of time, but I'm happy with the functionality of the plug-ins. Very good feature. Unfortunately, I'm still unable to monitor my ssh server with this, because the plug-in server catches the time-out error that I expected and send it to the pandora_server.error log....
 (the monitor remains with the unknown status)




   But this story has a happy end. The alert "Unknown status" can and will be used, as soon as I upgrade my pandora to version 3.2 (I'm still using the 3.1 version and this feature comes in 3.2)



{ 3.2 changelog:

[SERVER] Support for a new module state: UNKNOWN. Alerts are now possible to link to unknown status

}





    Thank you tpalacios and aitor for the help. I will upgrade my pandora as soon as possible.



Best regards.
Logged

daniels
Smart member
*****

Karma: 19
Offline Offline

Posts: 205



View Profile
« Reply #10 on: May 17, 2011, 01:45:24 PM »

One more tip about using ssh-plugin to monitor checks:

  It's a good idea to use the parameter -o ConnectTimeout=N, where N is the number of seconds to wait for the timeout. The default is 120 or 180 seconds, this is too much time for a pandora monitor.

  I modified my ssh_pandoraplugin.sh to include the variable:

CTIMEOUT=5

   and modified the last line of the plugin script:

ssh -o ConnectTimeout=$CTIMEOUT -p $PORT $USER@$HOST $COMMAND


Regards.
Logged

tpalacios
Administrator
Sr. Member
*****

Karma: 8
Offline Offline

Posts: 190


The Game


View Profile
« Reply #11 on: May 17, 2011, 02:32:12 PM »

It's fantastic once you are skilled in using Pandora right? ;)

There's a never ending amount of things like that you can do to improve your configuration.

Thanks for the tip, daniels. Very helpful.

Greetings.
Logged

Pages: [1]   Go Up
Print
 
Jump to:  


SourceForge.net Logo  This site is monitored by Pandora FMS   ArticaST