I thought it's useful to have a trigger to show you someone added or deleted a service on your linux machine...
It also detects if the startup script changed the executable flag.
I'm having it on interval 900 seconds.
Trigger: "Amount of startup services has decreased ({ITEM.LASTVALUE1}) on server {HOSTNAME}"
Trigger: "Amount of startup services has increased ({ITEM.LASTVALUE1}) on server {HOSTNAME}"
It also detects if the startup script changed the executable flag.
I'm having it on interval 900 seconds.
Code:
UserParameter=os.services, find -L /etc/rc`runlevel | tr -cd 0-9`.d/ -maxdepth 1 -mindepth 1 -type f -name S\* | xargs -i{} readlink -f {} | xargs -i{} stat -c%A {} | grep -c '^...x'
Trigger: "Amount of startup services has decreased ({ITEM.LASTVALUE1}) on server {HOSTNAME}"
Code:
{Template_Linux:os.services.last(#1)}<{Template_Linux:os.services.last(#2)}
Code:
{Template_Linux:os.services.last(#1)}>{Template_Linux:os.services.last(#2)}