From westerterp, 1 Year ago, written in YAML.
Embed
  1. Temperature:
  2. Dynamic Discovery (temperature):
  3.  
  4. array (
  5.   'data' =>
  6.   array (
  7.     0 =>
  8.     array (
  9.       'oid' => 'fgHwSensors',
  10.       'num_oid' => '.1.3.6.1.4.1.12356.101.4.3.2.1.{{ $index }}',
  11.       'index' => 'fgHwSensorEntIndex.{{ $index }}',
  12.       'descr' => 'fgHwSensorEntName',
  13.       'value' => 'fgHwSensorEntValue',
  14.       'skip_values' =>
  15.       array (
  16.         0 =>
  17.         array (
  18.           'oid' => 'fgHwSensorEntName',
  19.           'op' => 'regex',
  20.           'value' => '/^((?!Temp).)*$/',
  21.         ),
  22.         1 =>
  23.         array (
  24.           'oid' => 'fgHwSensorEntValue',
  25.           'op' => '=',
  26.           'value' => -1,
  27.         ),
  28.       ),
  29.     ),
  30.   ),
  31. )  
  32.  
  33. Data fgHwSensors:
  34.  
  35. array (
  36.   0 =>
  37.   array (
  38.     'fgHwSensorCount' => '44',
  39.   ),
  40.   1 =>
  41.   array (
  42.     'fgHwSensorEntIndex' => '1',
  43.     'fgHwSensorEntName' => '+VCC3',
  44.     'fgHwSensorEntValue' => '3.311',
  45.     'fgHwSensorEntAlarmStatus' => '0',
  46.   ),
  47.   2 =>
  48.   array (
  49.     'fgHwSensorEntIndex' => '2',
  50.     'fgHwSensorEntName' => '+VCC5',
  51.     'fgHwSensorEntValue' => '5.0172',
  52.     'fgHwSensorEntAlarmStatus' => '0',
  53.   ),
  54.   3 =>
  55.   array (
  56.     'fgHwSensorEntIndex' => '3',
  57.     'fgHwSensorEntName' => '+VCC12',
  58.     'fgHwSensorEntValue' => '11.976',
  59.     'fgHwSensorEntAlarmStatus' => '0',
  60.   ),
  61.  
  62.  ...
  63.  
  64.   33 =>
  65.   array (
  66.     'fgHwSensorEntIndex' => '33',
  67.     'fgHwSensorEntName' => 'PS1 Temp 1',
  68.     'fgHwSensorEntValue' => '23',
  69.     'fgHwSensorEntAlarmStatus' => '0',
  70.   ),
  71.   34 =>
  72.   array (
  73.     'fgHwSensorEntIndex' => '34',
  74.     'fgHwSensorEntName' => 'PS1 Temp 2',
  75.     'fgHwSensorEntValue' => '24',
  76.     'fgHwSensorEntAlarmStatus' => '0',
  77.   ),
  78.  
  79. ...
  80.  
  81. )  
  82.  
  83. Sensor fetched value: 23  
  84.  
  85. Cur 23, Low: null, Low Warn: null, Warn: null, High: null
  86.  
  87. Discover sensor: .1.3.6.1.4.1.12356.101.4.3.2.1.33, fgHwSensorEntIndex.33, fortigate, PS1 Temp 1, snmp, 1, 1, , 23, (limits: LL: , LW: , W: , H: ), rrd_type =  
  88.  
  89. SQL[SELECT COUNT(sensor_id) FROM `sensors` WHERE `poller_type`= ? AND `sensor_class` = ? AND `device_id` = ? AND sensor_type = ? AND `sensor_index` = ? ["snmp","temperature",5,"fortigate","fgHwSensorEntIndex.33"] 0.46ms]
  90.  
  91.  
  92. SQL[SELECT * FROM `sensors` WHERE `sensor_class` = ? AND `device_id` = ? AND `sensor_type` = ? AND `sensor_index` = ? ["temperature",5,"fortigate","fgHwSensorEntIndex.33"] 3.93ms]
  93.  
  94. .
  95. Sensor fetched value: 24  
  96.  
  97. Cur 24, Low: null, Low Warn: null, Warn: null, High: null
  98. Discover sensor: .1.3.6.1.4.1.12356.101.4.3.2.1.34, fgHwSensorEntIndex.34, fortigate, PS1 Temp 2, snmp, 1, 1, , 24, (limits: LL: , LW: , W: , H: ), rrd_type =  
  99.  
  100. SQL[SELECT COUNT(sensor_id) FROM `sensors` WHERE `poller_type`= ? AND `sensor_class` = ? AND `device_id` = ? AND sensor_type = ? AND `sensor_index` = ? ["snmp","temperature",5,"fortigate","fgHwSensorEntIndex.34"] 0.48ms]
  101.  
  102.  
  103. SQL[SELECT * FROM `sensors` WHERE `sensor_class` = ? AND `device_id` = ? AND `sensor_type` = ? AND `sensor_index` = ? ["temperature",5,"fortigate","fgHwSensorEntIndex.34"] 0.44ms]
  104.  
  105.  
  106. .
  107. array (
  108.   'fortigate' =>
  109.   array (
  110.     'fgHwSensorEntIndex.33' => 1,
  111.     'fgHwSensorEntIndex.34' => 1,
  112.   ),
  113. )  
  114.  
  115. SQL[SELECT * FROM sensors AS S, devices AS D WHERE S.sensor_class=? AND S.device_id = D.device_id AND D.device_id = ? AND S.poller_type = ? ["temperature",5,"snmp"] 0.64ms]
  116.  
  117.  
  118. fgHwSensorEntIndex.33 -> fortigate  
  119.  
  120. fgHwSensorEntIndex.34 -> fortigate