Subject: Test against integer from TCP/URL request

From: Scott Hiemstra <[email-masked]>
Date: Mon, 25 Oct 2010 14:29:47 -0400

I'm attempting to read an integer from an http request where in a browser the page is displayed as "0", "155" or something like that.  The mime type of the page is text/plain and I have verified there is no HTML being returned, just a number.  I'm trying to setup the test using maxvalue: 3 but it doesn't appear to be using that test.  Is it possible to test the value of returned http content against one of the extended tests?  If so, how would I go about doing that?  If you look at the most recent result below, you will see I only want to test against the "0" at the end of the result.  If it isn't possible, how would you go about testing something like this if you were required to?

Attempted config:
Service TCP/URL {
	frequency:	3600
	hostname:	services.myhost.com
	label:	CF Undeliverable
	maxvalue:	3
	messagedn:	Check crappy Coldfusion mail service for failed messages.
	messageup:	Failed messages have been cleared from crappy Coldfusion mail service.
	uname:	CF Undelierable
	url:		http://services.myhost.com/cf_undeliverable.cfm
}

Most recent result = "HTTP/1.1 200 OK Connection: close Date: Mon, 25 Oct 2010 18:20:35 GMT Server: Microsoft-IIS/6.0 X-Powered-By: ASP.NET Content-Type: text/plain 0"

# argusctl status
ARGUS/2.0 200 OK
status:    running
version:   dev-20100109
perlver:   5.8.8
osinfo:    Linux 2.6.18-194.11.3.el5 i686
darpmode:  master
objects:   370
services:  244
notifies:  5
uptime:    0:01:42
idle:      97.96% 0.00% 0.00%
monrate:   3.26 0.00 0.00 per second

Thanks in advance,
Scott

---

From: "Howells, Bruce E" <[email-masked]>
Date: Mon, 1 Nov 2010 08:47:27 -0700

When I've had to do something like this, I've either leveraged an external script (and run it through the Prog service) or used pluck.   Unfortunately, I don't seem to have a pluck usage example in my current configurations to share with you.

-----Original Message-----
From: [email-masked] [mailto:[email-masked]] On Behalf Of Scott Hiemstra
Sent: Monday, October 25, 2010 2:30 PM
To: [email-masked]'
Subject: Test against integer from TCP/URL request

Attempted config:
Service TCP/URL {
	frequency:	3600

# argusctl status
ARGUS/2.0 200 OK
status:    running
version:   dev-20100109
perlver:   5.8.8

Thanks in advance,
Scott
_______________________________________________
http://argus.tcp4me.com/
[email-masked]
http://www.tcp4me.com/mailman/listinfo/arguslist

---

From: Scott Hiemstra <[email-masked]>
Date: Mon, 1 Nov 2010 14:01:46 -0400

The trick was to use pluck, Jeremy helped out with it.

pluck: (\d+)$

Thanks,
Scott

-----Original Message-----
From: [email-masked] [mailto:[email-masked]] On Behalf Of Scott Hiemstra
Sent: Monday, October 25, 2010 2:30 PM
To: [email-masked]'
Subject: Test against integer from TCP/URL request

Attempted config:
Service TCP/URL {
	frequency:	3600

# argusctl status
ARGUS/2.0 200 OK
status:    running
version:   dev-20100109
perlver:   5.8.8

Thanks in advance,
Scott