Reputation: 417
I'm integrating alerts and events from Nagios to my system. On searching I have found an integration of Moogsoft with Nagios(click). I have followed this, but it was not successful.
In their 'Step 2: Configurations:' they mentioned about 'HOSTNAME', 'BASIC_AUTH' etc. I can't found any of these keys in the respective downloaded file. Can anyone provide clarification or suggest any other solution? Any help would be greatful.
Upvotes: 3
Views: 213
Reputation: 1482
I suspect this is bad documentation.
Both scripts simply echo (slightly formatted) output from Nagios and pipe this to the 'nc' command with the destination host and port number. The 'nc' command does not support HTTP authentication (like for instance 'curl' does), so it makes no sense why those options would be documented. Also, none of the HOSTNAME -to- BASIC_AUTH_PASS variables are ever used in the two shell scripts.
For example:
recStation="192.168.0.199"
recPort="9000"
And give it a shot.
Note that IF your Moogsoft system does require HTTP authentication, these scripts simply will not work. But it would be a simple matter to create a new shell script that used something like 'curl' to add authentication support.
Upvotes: 2
Reputation: 4301
Check out this link I found.
By the looks of it, you set the variables in the send-host-event.sh
and send-service-event.sh
files in the following way:
<FIELD>=<value>
So I assume you can place the variables directly after the recStation
and recPort
declarations.
Try this (change the values between the "<>"):
# Host name, IP and Port should match those set for recStation
HOSTNAME="<hostname/ipaddress:9000>"
BASIC_AUTH=<false/true>
# Only need to set these variables if BASIC_AUTH is set to true
BASIC_AUTH_USER="<auth_username>"
BASIC_AUTH_PASS="<auth_password>"
I hope that helps?
Upvotes: 1