Hi Stevie,
Sorry for the late response on my behalf.
Yeah, so the script that sends the heartbeats looks like this:
#!/bin/bash
#
# this script checks the status of icinga2 and sends a heartbeat message to imon
#
# the following line has to be added to the crontab with the command crontab -e:
# * * * * * /usr/lib64/nagios/plugins/a_send_heartbeat.sh
# check status of nagios/icinga server service
systemctl status icinga2 | grep 'active (running)' > /dev/null
if [ $? -eq '0' ]
then
#send heartbeat trap to hosts
/usr/bin/snmptrap -v 2c -c public 1.TEST.SERVER.HOST "" MIB::gGHeartBeatNotification sPCode s "G"
/usr/bin/snmptrap -v 2c -c public 2.TEST.SERVER.HOST "" MIB::gGHeartBeatNotification sPCode s "G"
#/usr/bin/snmptrap -v 2c -c public 1.PROD.SERVER.HOST "" MIB::gGHeartBeatNotification sPCode s "G"
#/usr/bin/snmptrap -v 2c -c public 2.PROD.SERVER.HOST "" MIB::gGHeartBeatNotification sPCode s "G"
fi
And the comment in this script regarding the crontab is what I set up and those work (even the for now commented ones), but I must be honest, I don’t know why those work and the others don’t. So I thought that it might be something with the notifications.conf that doesn’t work or maybe there is something I’m missing. I will definitely try to set up the trapdirector module for icingaweb2.
Edit: I found something right now, on the old instance (Icinga1) there is a mib2c folder with a bunch of files and in the /usr/share/snmp directory there are also a bunch of mib2c .conf files and 2 perl scripts apparently named snmp_perl.pl & snmp_perl_trapd.pl which are all missing in the new instance.
Also: How are the configs I send you? Do you see something off/missing or is everyting fine with them?