Hi,
I've been trying to make a simple nagios <-> server couple, without any luck.
I can see that nagios events reach the plugins in the server, but the response is not reaching back nagios dashboard.
Jun 4 13:04:10 ip-nagios mqbroker: Received message from frontend for device 0
Jun 4 13:06:51 ip-server mqbroker: Received message from backend for device 1
Jun 4 13:06:51 ip-server mqbroker: Received message from backend for device 1
Jun 4 13:06:51 ip-server mqexec: Received job from upstream: host_check_initiate /usr/local/nagios/libexec/check_ping -H 10.0.102.45 -w 3000.0,80% -c 5000.0,100% -p 5
Jun 4 13:06:51 ip-server mqexec: Kicked off 13346 for ip-10-0-102-45 (none)
Jun 4 13:06:55 ip-server mqexec: Sending result for ip-10-0-102-45 (none): PING OK - Packet loss = 0%, RTA = 0.02 ms|rta=0.024000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0#012 0
Jun 4 13:06:55 ip-server mqexec: Child 13346 ended with 0. Sending "PING OK - Packet loss = 0%, RTA = 0.02 ms|rta=0.024000ms;3000.000000;5000.000000;0.000000 pl=0%;80;100;0#012" upstream
Jun 4 13:06:55 ip-server mqbroker: Received message from frontend for device 2
These are the respective configurations for devices, everything else is just like the provided configuration examples.
Nagios
"devices": [
[ { "backend": { "type": "push", "bind":"tcp://*:5558",
"noblock":true },
"frontend": { "type": "sub",
"connect":"ipc:///var/nagios/nagmqevents.sock",
"subscribe": [ "service_check_initiate",
"host_check_initiate" ] } }
]
]
Server
"devices": [
[ { "backend": { "type": "push", "bind":"tcp://*:5558", "noblock":true },
"frontend": { "type": "sub", "connect":"ipc:///var/nagios/nagmqevents.sock",
"subscribe": [ "service_check_initiate", "host_check_initiate" ] } }
,
{ "backend": { "type": "pull", "connect":"tcp://ip-nagios:5558" },
"frontend": { "type": "push", "bind": "ipc:///var/nagios/mqexecjobs.sock" } },
{ "backend": { "type": "push", "connect":"tcp://ip-nagios:5556" },
"frontend": { "type": "pull", "bind": "ipc:///var/nagios/mqexecresults.sock" } }
]
]
I've just removed all filtering with tcpfilteraccept as found in the Readme.md just in case, but it wasn't working with them either.
I'm using a Nagios from source installation as described on the official install guide, also cloned latest nagmq repository from github.
Some extra comments:
The configuration guide is a little bit scarce, can you please elaborate on a simple scenario (like mine :))? I think most users will first attempt to build something similar.
The Wiki says "enable": true is required but it seems it works without that according to the Readme.md file.
I think --help options are not working in mqbroker and mqexec, so something is wrong in implementation. I'm I right?
I hope this note helps, thanks!