+ Reply to Thread
Results 1 to 5 of 5

Thread: Nagios doesn't get plugin's output

  1. maxgo is offline Junior Member
    Join Date
    June 24th, 2009
    Posts
    3
    Downloads
    0
    Uploads
    0

    Nagios doesn't get plugin's output

    Hello,

    We have installed the mtk-nagios-1.1 plug-in from rpm and also the sources, which contain the sample files.

    We have successfully restarted Nagios with all the services configured for one host, but when seeing the Web GUI, the services show (No Output), and the status becomes WARNING.

    This is the output for the fan-data option, when run manually:

    /usr/lib64/nagios/plugins/check_dell_status -H w.x.y.z --fan-data
    ESM MB Fan1: 4800 RPM (OK) ESM MB Fan2: 4920 RPM (OK) ESM MB Fan3: 7320 RPM (OK) ESM MB Fan4: 7140 RPM (OK) ESM MB Fan5: 7320 RPM (OK) ESM MB Fan6: 7200 RPM (OK) ESM MB Fan7: 7320 RPM (OK)

    In the web GUI, this is what we get:

    Dell Server Fans
    WARNING
    06-24-2009 18:32:32
    0d 0h 42m 18s
    5/5
    (No output!)


    Your advice or comments will be greatly appreciated.

    The plug-in apparently works very good except for this issue. It's been also posted in Dell's site:
    Dell's Nagios Plugin

    Thank you and regards,
    Max Glucksmann
    Comtel Networks, Corp.
    maxglucksmann@hotmail.com

  2. maxgo is offline Junior Member
    Join Date
    June 24th, 2009
    Posts
    3
    Downloads
    0
    Uploads
    0

    Progress

    Hello,

    Just wanted to make an observation...

    After setting the SETUID bit of the other files contained within the RPM, output was generated.

    Still, for the storage, virtual disks and battery items, the message "NO OMSA INSTALLED" was received.


    chown root.root /usr/lib64/nagios/plugins/dell_health.*
    chown root.root /usr/lib64/nagios/plugins/check_dell_status

    chmod 755 /usr/lib64/nagios/plugins/dell_health.*
    chmod +s /usr/lib64/nagios/plugins/dell_health.*

    chmod 755 /usr/lib64/nagios/plugins/check_dell_status
    chmod +s /usr/lib64/nagios/plugins/check_dell_status

    ls -l /usr/lib64/nagios/plugins/*dell*
    -rwsr-sr-x 1 root root 4211 2009-06-24 22:01 /usr/lib64/nagios/plugins/check_dell_status
    -rwsr-sr-x 1 root root 53780 2009-03-17 15:34 /usr/lib64/nagios/plugins/dell_health.py
    -rwsr-sr-x 1 root root 39594 2009-03-17 15:34 /usr/lib64/nagios/plugins/dell_health.pyc
    -rwsr-sr-x 1 root root 39594 2009-03-17 15:34 /usr/lib64/nagios/plugins/dell_health.pyo




    After checking the wrapper script "check_dell_status", to avoid the "NO OMSA INSTALLED" message, I created a service calling directly the "dell_health.py" script.

    Now, I'm getting "No value available" messages for the storage arrays, virtual disks and batteries...

    This is the service:

    nano /etc/nagios/commands/check_dell_health.cfg

    # 'check_dell_health' command definition
    define command{
    command_name check_dell_health
    command_line $USER1$/dell_health.py --host=$HOSTNAME$ --$ARG1$
    }



    Just to confirm, this is the output of the disk array, which doesn't show in the GUI:

    /usr/lib64/nagios/plugins/check_dell_status -H w.x.y.z --storage-array-data
    SCSI: Physical Disk 0:0: [Available] (OK) SCSI: Physical Disk 0:1: [Available] (OK) SCSI: Physical Disk 0:2: [Available] (OK) SCSI: Physical Disk 0:3: [Available] (OK) SCSI: Physical Disk 0:4: [Available] (OK)



    Or using directly the dell_health.py:

    /usr/lib64/nagios/plugins/dell_health.py --hostname=w.x.y.z --storage-array-data
    SCSI: Physical Disk 0:0: [Available] (OK) SCSI: Physical Disk 0:1: [Available] (OK) SCSI: Physical Disk 0:2: [Available] (OK) SCSI: Physical Disk 0:3: [Available] (OK) SCSI: Physical Disk 0:4: [Available] (OK)



    Any lead will be greatly appreciated.

    Thank you very much,
    Max
    Attached Images
    Last edited by maxgo; June 25th, 2009 at 03:33 AM.

  3. maxgo is offline Junior Member
    Join Date
    June 24th, 2009
    Posts
    3
    Downloads
    0
    Uploads
    0

    Bug

    Hello,

    Just a quick update...

    We were not using real hostnames, so by changing $HOSTNAME$ to $HOSTADDRESS$, the values showed properly.

    This one is a real bug though, in the section that shows the voltage-data:

    /usr/lib64/nagios/plugins/check_dell_status -H w.x.y.z --voltage-data
    Traceback (most recent call last):
    File "/usr/lib64/nagios/plugins/dell_health.py", line 1311, in <module>
    app.parse()
    File "/usr/lib64/nagios/plugins/dell_health.py", line 278, in parse
    str, result = self.getVoltageInformation()
    File "/usr/lib64/nagios/plugins/dell_health.py", line 700, in getVoltageInformation
    str += "%.1f V" % (voltages[x]['Reading'] / 1000)
    TypeError: unsupported operand type(s) for /: 'str' and 'int'


    BR,
    Max

  4. Harald Jensas is offline Junior Member
    Join Date
    April 19th, 2009
    Posts
    7
    Downloads
    2
    Uploads
    0

    I have the same bug.

    /usr/lib64/nagios/plugins/dell_health.py --hostname fileserver-01 --voltage-data
    Traceback (most recent call last):
    File "/usr/lib64/nagios/plugins/dell_health.py", line 1311, in ?
    app.parse()
    File "/usr/lib64/nagios/plugins/dell_health.py", line 278, in parse
    str, result = self.getVoltageInformation()
    File "/usr/lib64/nagios/plugins/dell_health.py", line 700, in getVoltageInformation
    str += "%.1f V" % (voltages[x]['Reading'] / 1000)
    TypeError: unsupported operand type(s) for /: 'str' and 'int'


    On another system however it does work, and the only difference I can think of is that the one that it works on has a DRAC card, and the one that it fails for does not.

  5. Harald Jensas is offline Junior Member
    Join Date
    April 19th, 2009
    Posts
    7
    Downloads
    2
    Uploads
    0

    PATCH for above bug.

    The bug above appers on only certain systems, I have seen in on R900 and PowerEdge 2950 systems. Older PowerEdge 2950 does not seem to be affected, but I am not 100% sure it is not that the older PowerEgde 2950 I have tested with has a DRAC card.

    The problem is that the code tries to divide a string. The below patch solved the problem.

    Code:
    --- dell_health.py	2009-07-20 20:00:36.000000000 +0100
    +++ dell_health.py.test	2009-07-20 20:04:21.000000000 +0100
    @@ -697,7 +697,8 @@
                 if voltages[x]['Reading'] == []:
                    pass
                 else:
    -               str += "%.1f V" % (voltages[x]['Reading'] / 1000)
    +	       voltages[x]['Reading'] = voltages[x]['Reading'].strip('mV')
    +               str += "%.1f V" % (int(voltages[x]['Reading']) / 1000)
                 voltages[x]['Voltage Status'], stateFlag = self.getStatusProbe(voltages[x]['Voltage Status'])
                 if stateFlag >= prevState:
                    prevState = stateFlag
    

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts