Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

Welcome to Pandora FMS Community Forums Community support Advanced troubleshooting Plugin does not send alarm, because the Status is always “NORMAL: WARNING:”

  • Plugin does not send alarm, because the Status is always “NORMAL: WARNING:”

    Posted by knoxel on February 7, 2012 at 18:05

    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

    alumbreras replied 12 years, 10 months ago 3 Members · 3 Replies
  • 3 Replies
  • aitor

    Member
    February 16, 2012 at 12:22
    7 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    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

  • knoxel

    Member
    February 17, 2012 at 11:40
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Good morning,

    “Regular expression” was the key 🙂

    Thanks for your help!

  • alumbreras

    Member
    February 17, 2012 at 12:23
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Hi,

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