cacti icon indicating copy to clipboard operation
cacti copied to clipboard

logging in cacti.log any change in hostname , description , snmp_comm string etc

Open gj00354347 opened this issue 3 years ago • 5 comments

Feature Request

Is your feature request related to a problem? Please describe

Dear Developers ,

we very often receive request to update the hostname , description or snmp_comm string in cacti (right now I am using cacti 1.2.18) .we do the same and required field is changed .

recently we were supposed to find like when this was changed and i went through old logs for a particular IP but could not find any message regarding the change in the description of the host . Although we did found a down device notification on XYZ name and we drew conclusion that this description might have changed after this notification date as notification was having old name .

so may be appending a few lines in host.php to log the change in hostname or description or snmp community string and we come to know like who has done the changed , when and what was the old value (of hostname , description or snmp_community string) .

it will be a nice feature to have and yes we can dispense with such info in database , this is a request to have it only in cacti.log . may be tweaking a few lines in host.php can do the trick .

Describe the solution you'd like

A clear and concise description of what you want to happen.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Add any other context or screenshots about the feature request here.

gj00354347 avatar Mar 23 '22 08:03 gj00354347

Great request @gj00354347!

TheWitness avatar Mar 23 '22 22:03 TheWitness

@TheWitness wouldn't this be a candidate for the audit plugin ?

bmfmancini avatar Mar 23 '22 23:03 bmfmancini

Yup, that is one approach. Right now Audit is simply too raw.

TheWitness avatar Mar 23 '22 23:03 TheWitness

But it only take time to fix that.

TheWitness avatar Mar 23 '22 23:03 TheWitness

@gj00354347 what I do for this is I have a script that collects the hostname, description from the DB then use the python easy snmp library to SNMP query the device if the DB description matches great else it logs the change

that way you can compare the DB hostname to what's configured on the device There is a change_device.php script in the cacti dev branch that works awesome I then call on that script to change the hostname for us automatically

But of course, if it could be built into cacti that would be awesome too :)

bmfmancini avatar Apr 01 '22 19:04 bmfmancini

Going to close this as the Audit plugin does this currently. It could use some enhancements though.

TheWitness avatar Nov 16 '22 01:11 TheWitness