Xymon Mailing List Archive search

xymon@xymon.com

4 messages in this thread

list Steffan Noord · Thu, 11 Oct 2018 16:22:16 +0200 ·
Hello Damien,

I treid your script.
When running in testmode it works fine.
It is creating /var/lib/xymon/tmp/xymon-hardware.msg

But when running as a deamon i am getting 
/bin/cat: /var/lib/xymon/tmp/xymon-hardware.msg: No such file or directory

Any idees?


Steffan

-----Oorspronkelijk bericht-----


Hi Théo,

With all due modesty, I wrote something that could match with your expectations :
https://wiki.xymonton.org/doku.php/monitors:hardware_sensors


Regards,
Damien Martins
list Damien Martins · Thu, 11 Oct 2018 16:43:04 +0200 ·
Hi Steffna,


Does your xymon user have read and write permissions on 
/var/lib/xymon/tmp directory ?

Can you remove the file created in test mode ?
quoted from Steffan Noord


Le 11/10/2018 à 16:22, Steffan a écrit :
Hello Damien,

I treid your script.
When running in testmode it works fine.
It is creating /var/lib/xymon/tmp/xymon-hardware.msg

But when running as a deamon i am getting
/bin/cat: /var/lib/xymon/tmp/xymon-hardware.msg: No such file or directory

Any idees?


Steffan

-----Oorspronkelijk bericht-----


Hi Théo,

With all due modesty, I wrote something that could match with your expectations :
https://wiki.xymonton.org/doku.php/monitors:hardware_sensors


Regards,
Damien Martins

-- 

Cordialement,
Damien Martins
list Steffan Noord · Thu, 1 Nov 2018 13:11:13 +0100 ·
Hello Damien,

There is a little bug in the script

/usr/sbin/hpacucli ctrl all show config | grep drive
      logicaldrive 1 (273.4 GB, RAID 1+0, OK)
      physicaldrive 2I:1:1 (port 2I:box 1:bay 1, SAS, 146.8 GB, OK)
      physicaldrive 2I:1:2 (port 2I:box 1:bay 2, SAS, 146.8 GB, OK)
      physicaldrive 2I:1:3 (port 2I:box 1:bay 3, SAS, 146.8 GB, OK)
      physicaldrive 2I:1:4 (port 2I:box 1:bay 4, SAS, 146.8 GB, OK)
      physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 146.8 GB, OK, spare)

/usr/sbin/hpacucli ctrl all show config | grep drive | awk '{print $NF}' | sed s/\)//
OK
OK
OK
OK
OK
Spare


So the sparedisk is reported as bad 😊

My change below:
        STATUS=$(echo $OUTPUT | awk '{print $NF}' | sed s/\)//)

        if [ "$STATUS" == "spare" ] ; then
                STATUS=$(echo $OUTPUT | cut -d',' -f4 | sed 's/ //g')
        fi
quoted from Damien Martins
        

-----Oorspronkelijk bericht-----
Van: Steffan <user-a2c231b1253e@xymon.invalid> 
Verzonden: donderdag 11 oktober 2018 16:22
Aan: 'xymon at xymon.com' <xymon at xymon.com>
Onderwerp: xymon at xymon.com

Hello Damien,

I treid your script.
When running in testmode it works fine.
It is creating /var/lib/xymon/tmp/xymon-hardware.msg

But when running as a deamon i am getting 
/bin/cat: /var/lib/xymon/tmp/xymon-hardware.msg: No such file or directory

Any idees?


Steffan

-----Oorspronkelijk bericht-----


Hi Théo,

With all due modesty, I wrote something that could match with your expectations :
https://wiki.xymonton.org/doku.php/monitors:hardware_sensors


Regards,
Damien Martins
list Damien Martins · Thu, 1 Nov 2018 14:40:44 +0100 ·
Thanks for sharing your finding and fix.
It forces me to think about a nice way to version my xymon scripts, so I'm happy to tell you that I'm moving all of this stuff to github. I'll add the new links to xymonton wiki

Regards,
Damien Martins
quoted from Steffan Noord

Le 01/11/2018 à 13:11, Steffan a écrit :
Hello Damien,

There is a little bug in the script

/usr/sbin/hpacucli ctrl all show config | grep drive
       logicaldrive 1 (273.4 GB, RAID 1+0, OK)
       physicaldrive 2I:1:1 (port 2I:box 1:bay 1, SAS, 146.8 GB, OK)
       physicaldrive 2I:1:2 (port 2I:box 1:bay 2, SAS, 146.8 GB, OK)
       physicaldrive 2I:1:3 (port 2I:box 1:bay 3, SAS, 146.8 GB, OK)
       physicaldrive 2I:1:4 (port 2I:box 1:bay 4, SAS, 146.8 GB, OK)
       physicaldrive 2I:1:5 (port 2I:box 1:bay 5, SAS, 146.8 GB, OK, spare)

/usr/sbin/hpacucli ctrl all show config | grep drive | awk '{print $NF}' | sed s/\)//
OK
OK
OK
OK
OK
Spare


So the sparedisk is reported as bad 😊

My change below:
         STATUS=$(echo $OUTPUT | awk '{print $NF}' | sed s/\)//)

         if [ "$STATUS" == "spare" ] ; then
                 STATUS=$(echo $OUTPUT | cut -d',' -f4 | sed 's/ //g')
         fi
         
-----Oorspronkelijk bericht-----
Van: Steffan <user-a2c231b1253e@xymon.invalid>
Verzonden: donderdag 11 oktober 2018 16:22
Aan: 'xymon at xymon.com' <xymon at xymon.com>
Onderwerp: xymon at xymon.com

Hello Damien,

I treid your script.
When running in testmode it works fine.
It is creating /var/lib/xymon/tmp/xymon-hardware.msg

But when running as a deamon i am getting
/bin/cat: /var/lib/xymon/tmp/xymon-hardware.msg: No such file or directory

Any idees?


Steffan

-----Oorspronkelijk bericht-----


Hi Théo,

With all due modesty, I wrote something that could match with your expectations :
https://wiki.xymonton.org/doku.php/monitors:hardware_sensors


Regards,
Damien Martins