What options do we have for (in real-time, not in a report handler)
generically notifying a resource when (for one example) a service was
restarted?
I’m wanting this, and certainly don’t want to embed the code in
~hundreds of init scripts’ “restart” code.
my_send_metric ‘thing’ do
action :nothing
metric 'thing.restarted’
value '1’
end
service ‘whatever’ do
action :nothing
notifies_ONLY_ON_RESTART :run, ‘my_send_metric[thing]’, :immediately
end
cookbook_file ‘/etc/whatever.conf’ do
notifies :restart, ‘service[whatever]’, :immediately
end
Possible at all currently?