-
Notifications
You must be signed in to change notification settings - Fork 1
/
check_mia_squid_hit_1.php
executable file
·32 lines (27 loc) · 1.08 KB
/
check_mia_squid_hit_1.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/local/bin/php5 -q
<?php
require_once('lib/MiaNagiosPluginSNMPSimple.inc.php');
class MiaNagiosPlugin_CheckSquidHit extends MiaNagiosPluginSNMPSimple{
/**
* (non-PHPdoc)
* @see nagios/plugins/lib/MiaNagiosPlugin#setSpecialProperties()
*/
protected function setSpecialProperties(){
$this->setSpecialProperty('intituleStatus','SQUID_HIT');
$this->setSpecialProperty('titre_aide','Plugins Nagios indiquant le ratio de hit squid sur 1 minute');
$this->setSpecialProperty('commentaire_aide','');
}
/**
* (non-PHPdoc)
* @see nagios/plugins/lib/MiaNagiosPlugin#setIndicators()
*/
protected function setIndicators(){
$this->addIndicatorSnmpSimple('squid_hit','.1.3.6.1.4.1.3495.1.3.2.2.1.9.1');
$this->setIndicatorUnit('squid_hit','%');
}
protected function StatusInformationFilter($name,$value){
return $name."=".$value."%";
}
}
$check=new MiaNagiosPlugin_CheckSquidHit();
$check->OutputResult();