I'm using Zabbix 5.0.18 and have a template trigger with this condition:
It works, in that it alerts me when the passwd file changes, but it sends the entire passwd file in the alert, and I have to do some work to figure out what changed.
I've been trying to get it to just list the changes since the previous value, but I don't know how:
* The history functions appear to be focused on numeric data only
* The javascript preprocessing step is only given the current value and doesn't have access to the previous value
* Writing a javascript preprocessing step that reaches out to the zabbix API to retrieve the previous value seems like overkill, but may be necessary
Is there a simple solution that I'm overlooking?
Thanks!
References:
* https://www.zabbix.com/documentation...ers/expression
* https://www.zabbix.com/documentation...gers/functions
* https://www.zabbix.com/documentation...ing/javascript
* https://www.zabbix.com/documentation...script_objects
* https://blog.zabbix.com/maintaining-zabbix-api-token-via-javascript/15561/
Code:
{Template Module Linux generic by Zabbix agent active:vfs.file.contents[/etc/passwd].diff()}>0
I've been trying to get it to just list the changes since the previous value, but I don't know how:
* The history functions appear to be focused on numeric data only
* The javascript preprocessing step is only given the current value and doesn't have access to the previous value
* Writing a javascript preprocessing step that reaches out to the zabbix API to retrieve the previous value seems like overkill, but may be necessary
Is there a simple solution that I'm overlooking?
Thanks!
References:
* https://www.zabbix.com/documentation...ers/expression
* https://www.zabbix.com/documentation...gers/functions
* https://www.zabbix.com/documentation...ing/javascript
* https://www.zabbix.com/documentation...script_objects
* https://blog.zabbix.com/maintaining-zabbix-api-token-via-javascript/15561/
Comment