Pages: [1]   Go Down
Author Topic: Plugin does not send alarm, because the Status is always "NORMAL: WARNING:"  (Read 191 times)
0 Members and 1 Guest are viewing this topic.
knoxel
Newbie
*

Karma: 0
Offline Offline

Posts: 8


View Profile
« on: February 07, 2012, 03:05:26 PM »

Hello,

I need some help with the alarms from nagios plugins. For example I have the nagios plugin "check_esxi_hardware.py" for checking the hardwarestatus from esxi servers. The plugin works fine, I get warning and error messages like "WARNING : Disk 1 on HPSA1 : Port 2I Box 1 Bay 4 : 68GB : Data Disk : Predictive Failure - Server: HP ProLiant DL380 G5 s/n: czc[...] System BIOS: P56 2008-09-29"
It looks like the attacked screenshot. The status is always green and I dont get alarm messages. I am working with a test system at the moment and have changed some parameters in the plugin. So i found out, that the plugin returns the following codes and the end of the plugin:

sys.exit (GlobalStatus)

# define exit codes
ExitOK = 0
ExitWarning = 1
ExitCritical = 2
ExitUnknown = 3

GlobalStatus is one of the values above and I have tested, that in my case the value of GlobalStatus is 1. So I think, that I can set the warning or critical status in the module configuration to 1 and the status have to change to yellow or red. But no matter where I set any waring status value, the status always stays green.

My tests and my information about the Plugin Exit Status is comming from this thread: http://openideas.info/smf/index.php/topic,1004.0.html

I am using ESXi 5.0 (newest build) and Pandora 4.0.1. The Nagios Plugin is also the newest.
I dont have checked it right now, but I am using the check_hpasm nagios plugin as well. May I will have the same problems and wont get alerted if any hardwareproblem occurs?

Thanks for your help,
regards


* pandora_warning_no_alert.jpg (15.92 KB, 534x110 - viewed 33 times.)
Logged

aitor
Sr. Member
****

Karma: 2
Offline Offline

Posts: 129


View Profile
« Reply #1 on: February 16, 2012, 09:22:42 AM »

Good morning:

You have 2 options

1.- When you configure the alarm template, you may choose "Regular expression" instead of "Warning state" in condition type. Then in "Data" write WARNING. This alarm will fire always that data contains "warning" string. You have to create another template for critical.

2.- In pandora 4.0, when you add a module to an agent, you can choose to set numeric values to warning or critical state, or you can add an string too. See the image, it's in spañish, but you will understood it.

Bye


* chesk_esxi.png (9.38 KB, 993x205 - viewed 23 times.)
Logged

knoxel
Newbie
*

Karma: 0
Offline Offline

Posts: 8


View Profile
« Reply #2 on: February 17, 2012, 08:40:04 AM »

Good morning,

"Regular expression" was the key :)

Thanks for your help!
Logged

alumbreras
Sr. Member
****

Karma: 5
Offline Offline

Posts: 108


View Profile
« Reply #3 on: February 17, 2012, 09:23:48 AM »

Hi,

If you use 3.2 or above the regular expression and strings don't work. Only work in 4.0 and later

Logged

Pages: [1]   Go Up
Print
 
Jump to:  


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