Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Plugin does not send alarm, because the Status is always "NORMAL: WARNING:"
#1
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


Attached Files


.jpg   pandora_warning_no_alert.jpg (Size: 15.92 KB / Downloads: 189)
 Reply
#2
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


Attached Files


.png   chesk_esxi.png (Size: 9.38 KB / Downloads: 178)
 Reply
#3
Good morning,

"Regular expression" was the key Smile

Thanks for your help!
 Reply
#4
Hi,

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

 Reply


Users browsing this thread: 1 Guest(s)


(c) 2006-2018 Artica Soluciones Tecnológicas. Contents of this wiki are under Create Common Attribution v3 licence. | pandorafms.com | pandorafms.org

Theme © MyBB Themes