Joe,
I really need both service checks. The particular webserver that I'm
polling is protected by some kind of authentication agent, where I'm
expecting an HTTP Redirect message to get to the auth server on the /
document. The check for /public/servlet/snoop is supposed to see if my
Websphere is really running or not.
I was able to whip up a quick C program on one of my Linux servers to
simulate what IIS+Websphere appears to be doing. If you have a Linux
machine available, compile this on it and set up an http-like custom
service for it.
Hopefully this can help.
/*
*
*
*/
#include<stdio.h>
#include<string.h>
#include<sys/types.h>
#include<sys/time.h>
#include<sys/socket.h>
#include<netinet/in.h>
#include<unistd.h>
#include<errno.h>
#include<stdlib.h>
void main(void)
{
int mysocket, newsocket;
int rc;
struct sockaddr_in address,newaddress;
socklen_t newlen=sizeof(newaddress);
FILE *fp;
char buf[9999];
if((mysocket=socket(PF_INET,SOCK_STREAM,0))==0)
{
printf("failed to make socket\n");
exit(1);
}
address.sin_family=AF_INET;
address.sin_port=htons(7008);
address.sin_addr.s_addr = INADDR_ANY;
if (bind(mysocket, (struct sockaddr *)&address, sizeof(address)) < 0)
{
fprintf(stderr, "bind() failed: %s\n", strerror(errno));
close(mysocket);
exit(0);
}
if (listen(mysocket, 5) < 0) {
fprintf(stderr, "listen() failed: %s\n", strerror(errno));
close(mysocket);
exit(0);
}
while(1)
{
newsocket=accept(mysocket,&newaddress,&newlen);
printf("Connected\n");
fp=fdopen(newsocket,"rt");
if(fp==NULL)
{
printf("fdopen failed\n");
return 0;
}
while(fgets(buf,9998,fp)!=NULL)
{
if( (strcmp(buf,"\r\n")==0) || (strcmp(buf,"\n")==0) )
{
printf("Blankline\n");
sleep(2);
break;
}
}
close(newsocket);
}
}
--D
Duane Waddle
[EMAIL PROTECTED]
"With sufficient thrust, pigs fly just fine..." -- RFC1925
"Joe Sepielli" <[EMAIL PROTECTED]>@list.ipswitch.com on 05/30/2001
06:22:20 PM
Please respond to [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
To: <[EMAIL PROTECTED]>
cc:
Subject: Re: [WhatsUp Forum] Custom TCP/IP -- expected response not
triggered on
Duane,
>From your log I see two consecutive custom service checks:
GET / HTTP/1.1
followed by
GET /public/servlet/snoop HTTP/1.1
This looks as if you have two instances of a custom service defined and
applied to
the device. I could not re-create your problem, but I would remove the
first
service from the device.
Another thing to try is to modify your Expected Response so that you are
looking
for a more specific pattern match.
Change:Expected Response=~.*Snoop Servlet.*
To:Expected Response=~<TITLE>Snoop Servlet</TITLE>
This would eliminate any possibility that you are finding your pattern in
the returned
header.
Joe
(snip snip)
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/