monitors:retmt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
monitors:retmt [2017/10/18 10:58] – [Description] wnelismonitors:retmt [2020/01/28 10:12] – [Client side] wnelis
Line 31: Line 31:
 # #
 # Written by W.J.M. Nelis, wim.nelis@ziggo.nl, 2017.10 # Written by W.J.M. Nelis, wim.nelis@ziggo.nl, 2017.10
 +#
 +# Modified by W.J.M. Nelis, wim.nelis@ziggo.nl, 2018.07
 +# - Specify the device type in the RRD file name, in this case 'cpu'.
 # #
 use strict ; use strict ;
Line 46: Line 49:
 chomp $HostName ; chomp $HostName ;
 my $TestName= 'env' ; # Test name my $TestName= 'env' ; # Test name
-my $ThresholdYellow= 50 ; # Warning threshold [C] +my $ThresholdYellow= 60 ; # Warning threshold [C] 
-my $ThresholdRed   60 ; # Error threshold [C]+my $ThresholdRed   70 ; # Error threshold [C]
  
 my @ColourOf= ( 'red', 'yellow', 'clear', 'green' ) ; my @ColourOf= ( 'red', 'yellow', 'clear', 'green' ) ;
Line 68: Line 71:
  
 # #
-# Issue a message the the logfile. As this script is run periodically by Xymon,+# Issue a message to the logfile. As this script is run periodically by Xymon,
 # StdOut will be redirected to the logfile. # StdOut will be redirected to the logfile.
 # #
Line 102: Line 105:
   $Result= "\"status $HostName.$TestName $Colour $Now\n" .   $Result= "\"status $HostName.$TestName $Colour $Now\n" .
     "<b>Temperature sensor readings</b>\n\n" .     "<b>Temperature sensor readings</b>\n\n" .
-           "$ErrMsg$Result\"\n"+    "$ErrMsg$Result\"\n"
-  `$XySend $XyDisp $Result` ;           # Inform Xymon+  `$XySend $XyDisp $Result` ; # Inform Xymon
  
-  $Result= ''                        # Reset message parameters+  $Result= '' ; # Reset message parameters
   $Colour=  3 ;   $Colour=  3 ;
   $ErrMsg{$_}= [] foreach ( @ColourOf ) ;   $ErrMsg{$_}= [] foreach ( @ColourOf ) ;
Line 137: Line 140:
   @Lines= `$GpuCmd` ; # Retrieve information   @Lines= `$GpuCmd` ; # Retrieve information
   if ( @Lines == 0 ) {   if ( @Lines == 0 ) {
-    push @{$ErrMsg{clear}}, "Cannot read GPU temperature from $GpuCmd:\n" .+    push @{$ErrMsg{clear}}, "Cannot read GPU temperature from \`$GpuCmd\`:\n" .
      "  no data returned" ;      "  no data returned" ;
   } else {   } else {
     chomp $Lines[0] ;     chomp $Lines[0] ;
     unless ( $Lines[0] =~ m/^temp=([\d\.]+).+C$/ ) {     unless ( $Lines[0] =~ m/^temp=([\d\.]+).+C$/ ) {
-      push @{$ErrMsg{clear}}, "Cannot read GPU temperature from $GpuCmd:\n" .+      push @{$ErrMsg{clear}}, "Cannot read GPU temperature from \`$GpuCmd\`:\n" .
        "  unexpected input : $Lines[0]" ;        "  unexpected input : $Lines[0]" ;
     } else {     } else {
Line 209: Line 212:
   $Result.= "<!--DEVMON RRD: env 0 0\n" ;   $Result.= "<!--DEVMON RRD: env 0 0\n" ;
   $Result.= "DS:Temperature:GAUGE:600:-100:100 DS:MinTemp:GAUGE:600:-100:100 DS:MaxTemp:GAUGE:600:-100:100\n" ;   $Result.= "DS:Temperature:GAUGE:600:-100:100 DS:MinTemp:GAUGE:600:-100:100 DS:MaxTemp:GAUGE:600:-100:100\n" ;
-  $Result.= "temp $TempAvg:$TempMin:$TempMax\n" ;+  $Result.= "temp.cpu $TempAvg:$TempMin:$TempMax\n" ;
   $Result.= "-->" ;   $Result.= "-->" ;
 }  # of BuildMessage }  # of BuildMessage
Line 266: Line 269:
 <code> <code>
 # #
-# Graph definitions for additional tests in xymon, which are local to this +# Graph definitions for test 'env'.
-# installation of xymon.+
 # #
 [env] [env]
Line 293: Line 295:
 </code> </code>
  
- 
-===== Source ===== 
- 
-===== Known  Bugs and Issues ===== 
- 
-===== To Do ===== 
- 
-===== Credits ===== 
  
 ===== Changelog ===== ===== Changelog =====
  • monitors/retmt.txt
  • Last modified: 2020/01/28 10:22
  • by wnelis