To see when a switch configuration is not saved

Hi,

For comware-based switches, there are two values that can be read that would help knowing if the switch has an unsaved configuration. hh3cCfgRunModifiedLast is a timetick that is a recorded value of sysuptime when the configuration was last modified. hh3cCfgRunSavedLast on the other hand is a recorded value of sysuptime when the configuration was last saved to startup.

By comparing these values, you can know if a switch’s configuration has been modified but not saved. I would like to be able to create an alert when there’s an unsaved alert older than let’s say 24 hrs. I have successfully been able to get the values to LibreNMS but now my head is blank when it comes to how I would create the alert. Can anyone help?

I forgot that I had already asked this question in March. Nobody knew anything about then, so I doubt that I will get any more reponse now.

Hi @Tomas_Andersson

If the values are in the DB, then you can alert on them. If not, you have to add them. The proper way would be to create a component that would “compute” the boolean value “unsaved config” to true or false. And then you can create the alert on it.
Look in the dev documentation about components.