📜 ⬆️ ⬇️

Zabbix, collection of data on installed dslam siemens hix5630 maps

I decided to collect data on current firmware versions from my Siemens HIX5630 DSLAM.
OID was found by snmpwalk fast enough.

.1.3.6.1.4.1.231.7.7.2.2.1.1.2.1.1.12.xx
where xx = 13 14 15 16 17 18 19 20 respectively 1 2 3 4 7 8 9 10 IU boards (modem or voice)
and 21 and 22 CXU (processor) boards.


According to this oid, the current firmware on which the board operates is issued. The show upgrade table output gives not the current downloaded firmware but the firmware that will load when the board is rebooted.
')
1.3.6.1.4.1.231.7.1.2.2.1.1.2.1.1.13. Xx this oid gives the firmware version loaded into the board, but not running on it. To start the board on this firmware, you must issue the command reset card <slot â„–>

By comparing these values, you can find out if the firmware was updated and, if it was, but the board was not reset, you can issue a recommendation to reboot the board in order to pick up the latest update.

You can go ahead and write a script that automatically made a reboot of the card at night during the period of minimal subscriber activity.

There are other oid for example, giving only the firmware code.
1.3.6.1.4.1.231.7.1.2.2.1.2.2.2.1.4. Xx.1

We create a new item in zabiks for example card1soft with OID .1.3.6.1.4.1.231.7.1.2.2.1.1.2.1.1.12.13 and the data type “symbol”.
We hang a trigger on it
{{HOSTNAME}: card1soft.change (0)} # 0 and call it Change of firmware 1 card Having suspended the action on the trigger / triggers, we receive notifications on updating the firmware.

We create a new item in zabiks for example, card1softupg with OID .1.3.6.1.4.1.231.7.1.2.2.1.1.2.1.1.13.13 and the data type “symbol”.

And we write a trigger that will check these values.
And the trigger, I could not make


Further, when viewed in Monitoring / Latest data , truncated data is displayed - 20 characters. Having rummaged in source codes found where it is cut.

/public_html/include/items.inc.php line 1381
function format_lastvalue($db_item){
if (isset($db_item[ "lastvalue" ])){
if ($db_item[ "value_type" ] == ITEM_VALUE_TYPE_FLOAT){
$lastvalue=convert_units($db_item[ "lastvalue" ],$db_item[ "units" ]);
}
else if ($db_item[ "value_type" ] == ITEM_VALUE_TYPE_UINT64){
$lastvalue=convert_units($db_item[ "lastvalue" ],$db_item[ "units" ]);
}
else if ($db_item[ "value_type" ] == ITEM_VALUE_TYPE_STR ||
$db_item[ "value_type" ] == ITEM_VALUE_TYPE_TEXT ||
$db_item[ "value_type" ] == ITEM_VALUE_TYPE_LOG){
$lastvalue=$db_item[ "lastvalue" ];
if (strlen($lastvalue) > 20)
$lastvalue = substr($lastvalue,0,20). " ..." ;
$lastvalue = nbsp(htmlspecialchars($lastvalue));
}
else {
$lastvalue= "Unknown value type" ;
}
if ($db_item[ "valuemapid" ] > 0);
$lastvalue = replace_value_by_map($lastvalue, $db_item[ "valuemapid" ]);

}
else {
$lastvalue = "-" ;
}
return $lastvalue;

* This source code was highlighted with Source Code Highlighter .


As you can see the output is chopped up to 20 characters, I needed to get 30 characters
Replacing 2 numbers from 20 to 30 received a full output of the firmware version.

if (strlen($lastvalue) > 30)
$lastvalue = substr($lastvalue,0,30). " ..." ;


* This source code was highlighted with Source Code Highlighter .


Here's another useful OID
Especially useful to monitor the temperature of the boards.
1.3.6.1.2.1.47.1.1.1.1.11.xx card serial number (symbol)
1.3.6.1.4.1.231.7.1.2.2.1.1.2.1.1.14.xx card temperature (number)
where xx = 13 14 15 16 17 18 19 20 respectively 1 2 3 4 7 8 9 10 IU boards (modem or voice)
and 21 and 22 CXU (processor) boards.

1.3.6.1.4.1.231.7.1.2.2.1.1.1.1.1.5.xx card type (symbol)
where xx = 3 4 5 6 7 8 9 10 respectively 1 2 3 4 7 8 9 10 IU boards (modem or voice)
and 11 and 12 CXU (processor) boards.

Threat Unfortunately I could not find the OID that would be able to report on the status of the fans. Which of them work, and which are out of order. In the console, it's easy to check.

UPD Constantly changing and adding content. Please treat possible errors with understanding. So say this is a hot pie that I make today.

Source: https://habr.com/ru/post/83460/


All Articles