Reputation: 11629
I need to monitor some file existence in an AWS S3 bucket and I created a simple Nagios plugin for that. Now I have to configure it and defined it as a command something like this:
define command{
command_name check_s3file_exist
command_line /usr/lib/nagios/plugins/check_s3_exist.py $ARG1$
}
Now the command needs to be used in service definition but as far as I can see Nagios is centered around the concept of host but S3 isn't a host so I am at a loss where to call this command.
Upvotes: 5
Views: 2911
Reputation: 41
you can define virtual host with active checks disabled and passive checks enabled. Then submit passive check result as OK - you will have this status forever.
I created host called "Internet access" with random IP and did what I wrote above because icmp requests to external hosts are not allowed in the network. Then I added some checks of public web pages.
Upvotes: 4
Reputation: 11629
I ended up calling this command from one of the servers Nagios is monitoring. It looks like Nagios monitoring has to be bounded with a host.
Upvotes: 3
Reputation: 2914
Nagios is just bound to HOSTNAME defined in its host to check for, as long as you are using predefined commands. In the example below the command there would be predefined as
check_http -H $HOSTNAME$ ...
You are looking for already available command
/usr/lib/nagios/plugins/check_http -H www.google.de -u /maps
where the u Parameter is the desired URI to check for
so just define the command
define command{
command_name check_s3file_exist
command_line /usr/lib/nagios/plugins/check_http -H $ARG1$ -u $ARG2$
}
Upvotes: 1