check_log not working properly
Neil
neil-on-nagios at restricted.dyndns.org
Fri Feb 13 19:48:35 CET 2004
Jim Mozley writes:
>
> define service{
> use mpls-service-template ; template
> host_name host1
> service_description mpls
> check_command ""
> }
>
>
> You will need to extract the hostname from the syslog message (and
> possibly the service unless this is hardcoded - it is in this example).
>
> In the end you want to build a message such as:
>
> my $cmd = "[$epoch]
> PROCESS_SERVICE_CHECK_RESULT;$host;$service;$nagios_code;$msg";
Looks like I'm very close. Another question. Am I correct that the variable
$host and $service should match the strings we defined in services.cfg?
Here is an example of what I mean:
define service{
use nt-service-templace
host_name iisserver1
service_description w3svc
check_command ""
}
my $cmd = "[$epoch]
PROCESS_SERVICE_CHECK_RESULT;iisserver1;w3svc;$nagios_code;$msg";
I can use variables there but I hardcoded it for clarity.
And also, after reading and reading topics about this, swatch or nagios
doesn't have to work together. Although, swatch just needs to populate the
nagios.cmd with the format that NAGIOS is expecting. Am I right?
Let me know.
Thanks again.
Ronneil
-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list