expect & pluck troubles
Jim Roberts
jim at screentime.com
Wed Jan 12 22:42:43 EST 2005
I find that when my configuration includes a pluck, but no expect, my
test fails "TEST did not match expected regex".
If I "expect: .*" everything works as I thought it might. If I leave
the expect: line out, my service always show down.
Here: http://argus.tcp4me.com/xtservices.html there is an example where
there is no expect:, so I didn't think it necessary.
I threw in some extra debugging into "Service.pm" and found that
$my->{test}{expect} had some junk in it, starting with "HTTP"
Perhaps there's some place where the value of $my->{test}{expect}
should be cleared, and isn't?
I have attached my config file, with the domains changed.
It is the longest config that I am having trouble with, ns4, TCP/URL
Actual output from the php script is: "temperature: 33 degrees C"
Here is my config:
----------------
# locations of various items on web pages
sirensong: /~argus/sound/whoopwhoop.wav
bkgimage: /~argus/img/argus.logo.gif
icon: /~argus/img/smile.gif
icon_down: /~argus/img/sad.gif
nospkr_icon: /~argus/img/nospkr.gif
style_sheet: /~argus/argus.css
# send messages to syslog
syslog: daemon
# who should be notified when things break?
notify: mail:jim at example.com
frequency: 600
timeout: 30
renotify: 3600
Group "Example" {
Host "ns1" {
hostname: ns1.example.com
Service UDP/DNS
Service TCP/HTTP
Service TCP/POP
Service TCP/SMTP
}
Host "ns2" {
hostname: ns2.example.com
Service UDP/DNS
Service TCP/HTTP
}
Host "ns3" {
hostname: ns3.example.com
Service TCP/FTP {
hostname: ftp.example.com
}
Service TCP/HTTP
}
Host "ns4" {
hostname: ns4.example.com
Service TCP/FTP
Service TCP/HTTP
Service TCP/HTTPS
Service TCP/URL {
graph: yes
label: CPUTemp
uname: NS4 Processor Temperature
messagedn: NS4 CPU is over temperature
url:
http://www.example.com/cputemp.php
pluck: temperature: (\S*)
expect: .*
maxvalue: 45
# debug: yes
}
}
Host "ns7" {
hostname: ns7.example.com
Service UDP/DNS
Service TCP/SMTP
Service TCP/HTTP
}
}
More information about the Arguslist
mailing list