How to make a disconnection log

Hello, I am new to using icinga 2 and I am monitoring a laptop with ubuntu 20.04 and raspbian from another laptop running icinga web2 which has debian 10 installed. I would like to make a log system that allows me to save all the disconnection dates of each device monitored 24 hours, any idea how to do it?

Are you using icingaweb2? If so then adding module reporting should do what you want.
You can then create a report with those hosts SLA (choosing Host SLA in the report type) I think will do what you want.
The other option is under History for the individual hosts you should have the notification/UP/DOWN events in there.

Another option is you could create a custom notification, that custom notification could just append write to a logfile of your choice to keep a log of the UP and DOWN events for the host notification.

Hope those give you some ideas.

1 Like