check_mikrotik_sw_fw -H devicename -c snmpsecret 1.3.6.1.8.1.1.4.4.0)Įcho "OK: Software and firmware versions match ($SW)"Įcho "CRITICAL: Software version $SW does not match firmware version $FW"Įcho "WARNING: Software version $SW does not match firmware version $FW"Ī test run from the shell provides useful output. SW=$(snmpwalk -Ov -On -Oq -Cc -c $COMMUNITY -v $VERSION $HOST. !/bin/bashįW=$(snmpwalk -Ov -On -Oq -Cc -c $COMMUNITY -v $VERSION $HOST. If you’ve forgotten a firmware upgrade, the script will issue a WARNING text with a corresponding exit value 1, but it also accepts a -C argument to return a CRITICAL state and exit value 2. Sorry, I haven’t made it SNMPv3 compatible yet. The script takes a couple of arguments: -H for hostname, -c for entering the SNMP community, and -v for versions 1 or 2c. When it’s this easy to check whether the firmware upgrade was forgotten after a software upgrade, it took just a few minutes to write a shell script to be used in Icinga or Nagios. Previously there were no logical way to compare matching versions between the OS software and the boot firmware, but some time ago the vendor started aligning the two components’ version numbers and that made today’s small endeavor much easier. Or, if you’ve configured the unit for automatic firmware upgrade after a software upgrade, you will be greeted by a message like this at login time: Firmware upgraded successfully, please reboot for changes to take effect! In the devices’ various management interfaces including command line, the OS will tell you that there are outstanding firmware patches if you ask it, like this: /system routerboard print When upgrading the software (RouterOS) on Mikrotik devices, you should usually also make sure the firmware ( RouterBoot) is upgraded to the same level.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |