Sorry, the last post has a line missing from the code.

For those people that want to monitor a Cold Fusion Server with What's Up 
Gold V7 here is how I got it to work with a great deal of help from Shawn 
Savadkohi, Network Administrator - City of Santa Cruz.

Thanks again Shawn! :-)

        Brian



Here is the CF code I'm using. The file name is: WhatUpGoldCFTest.cfm
It connects to a database and gets all the records and displays WHATSUPOKAY 
if the database has more than 0 records.

<!--- CFtry & CFcatch prevent the code from throwing a CF error just in 
case the database connection fails --->
<CFTRY>
<!--- Connect to database and get all records --->
<!--- change the datasource & From table to match a database on your server 
--->
<CFQUERY NAME="cftest" DATASOURCE="DNS">
select * From names
</CFQUERY>
<CFCATCH TYPE="Any">
</CFCATCH>
</CFTRY>
<!--- set the result variable to NO --->
<CFSET results="NO">
<!--- test if record count has a value --->
<CFIF isdefined("cftest.recordcount")>
<!--- if record count is greater than zero set result variable to WHATSUPOKAY
<CFIF cftest.recordcount gt 0>
<CFSET results="WHATSUPOKAY">
</CFIF>
</CFIF>
<!--- Display contents of result  variable but hides the output from prying 
eyes --->
#results#

Here is the Cold Fusion, Monitor & Service definition.

Send=GET /WhatUpGoldCFTest.cfm HTTP/1.0\r\nAccept: 
*/*\r\nUser-Agent:WhatsUp_Gold/7.0\r\n\r\n
Expect=~.*WHATSUPOKAY


Please visit http://www.ipswitch.com/support/mailing-lists.html 
to be removed from this list.

An Archive of this list is available at:
http://www.mail-archive.com/whatsup_forum%40list.ipswitch.com/

Reply via email to