Projet

Général

Profil

Révision 3032db48

ID3032db4890bc6b7ae7b2fcf0b0b81011aee56a40
Parent 0cfcf2cc
Enfant 475fe56d

Ajouté par Alejandro Suarez il y a plus de 5 ans

Added monitoring of router temperature

Voir les différences:

plugins/router/snmp__mikrotik
49 49
my $sysFlashTotalOID = "1.3.6.1.2.1.25.2.3.1.5.131072";
50 50
my $sysRAMUsageOID = "1.3.6.1.2.1.25.2.3.1.6.65536";
51 51
my $sysRAMTotalOID = "1.3.6.1.2.1.25.2.3.1.5.65536";
52
my $sysTempOID = "1.3.6.1.4.1.14988.1.1.3.10.0";
52 53

  
53 54
my $response;
54 55

  
......
57 58
    print "require $sysFlashTotalOID\n";
58 59
    print "require $sysRAMUsageOID\n";
59 60
    print "require $sysRAMTotalOID\n";
61
    print "require $sysTempOID\n";
60 62
    exit 0;
61 63
}
62 64

  
......
112 114
        print "sysRAMUsage.label Used Memory\n";
113 115
        print "sysRAMUsage.draw AREA\n";
114 116
    }
117

  
118
    $response = $session->get_request($sysTempOID);
119
    if (defined $response) {
120
        print "multigraph temp\n";
121
        print "graph_vlabel degC \n";
122
        print "graph_title Temperature\n";
123
        print "graph_category sensors\n";
124
        print "graph_info This graph shows the router's temperature.\n";
125
        print "sysTemp.label Temperature\n";
126
        print "sysTemp.type GAUGE\n";
127
    }
115 128
    exit 0 unless (($ENV{MUNIN_CAP_DIRTYCONFIG} || 0) == 1);
116 129
}
117 130

  
......
136 149
        print "sysRAMTotal.value U\n";
137 150
}
138 151

  
152
print "multigraph temp\n";
153
$response = $session->get_request(-varbindlist => [$sysTempOID]);
154
if (defined $response) {
155
        print "sysTemp.value ", $response->{$sysTempOID}/10, "\n";
156
} else {
157
        print "sysTemp.value U\n";
158
}
159

  
139 160
# vim:syntax=perl

Formats disponibles : Unified diff