NetXMS Support Forum

English Support => General Support => Topic started by: DH on May 10, 2012, 11:32:40 AM

Title: Cannot figure web site monitor
Post by: DH on May 10, 2012, 11:32:40 AM
Hi,

I'm struggling with trying to monitor web sites and hope someone can point out how thick I am in a constructive manner !

An example configuration:

  Node "www.infoshop.co.uk"
   Polling: access to NextXMS agent disabled, usage of SNMP for all polls disabled
   Service "Web Site"
     Service type: http, tcp/udp port: 80
     Request: www.infoshop.co.uk
     Expected response: ^HTTP/1\.[01] 200.*

The results of a status poll are:
[10-May-2012 09:27:10] Sending poll request to server...
[10-May-2012 09:27:10] Poll request accepted
[10-May-2012 09:27:10] Starting status poll for node www.infoshop.co.uk
[10-May-2012 09:27:10]    Starting status poll on interface lan0
[10-May-2012 09:27:10]       Current interface status is NORMAL
[10-May-2012 09:27:10]       Starting ICMP ping
[10-May-2012 09:27:10]       Interface is NORMAL for 13 polls (1 poll required for status change)
[10-May-2012 09:27:10]       Interface status after poll is NORMAL
[10-May-2012 09:27:10]    Finished status poll on interface lan0
[10-May-2012 09:27:10]    Starting status poll on network service Web site
[10-May-2012 09:27:10]       Current service status is Unknown
[10-May-2012 09:27:10]       Polling service from node FS01.bustednetworks.com [192.168.0.31]
[10-May-2012 09:27:10]       Unable to check service status due to agent or communication error
[10-May-2012 09:27:10]    Finished status poll on network service Web site
[10-May-2012 09:27:10] iNode is connected
[10-May-2012 09:27:10] Finished status poll for node www.infoshop.co.uk
[10-May-2012 09:27:10] Node status after poll is NORMAL
[10-May-2012 09:27:10] Poll completed successfully

All I ever get is "Unable to check service status due to agent or communication error". I have checked browsing to the monitored web site from the NetXMS server, that works fine. I have no idea how to test what actual response I should get from the web server, any help / suggested tools would be appreciated.

Regards,
David Hewison
Title: Re: Cannot figure web site monitor
Post by: Victor Kirhenshtein on May 15, 2012, 09:55:53 AM
Hi!

Looks like on node FS01.bustednetworks.com (which is set as poller node for this service) is not loaded portcheck subagent.

Best regards,
Victor
Title: Re: Cannot figure web site monitor
Post by: DH on May 15, 2012, 11:31:46 AM
Hi Victor,

I'm not sure I understand the elements involved here, the monitored node, www.infoshop.co.uk , is an Internet facing web site on a shared server at an ISP, I have no access other than http. In NetXMS the node has the NetXMS agent and SNMP polling disabled, the 'child' service of this node, 'Web Site', has a service type of 'HTTP' and port 80.
Is my mistake thinking that the monitoring of HTTP port 80 is done from the NetXMS server, must it be done from a local agent on the node itself ? If that is the case, is it possible to monitor a TCP application service such as an HTTP server from the NetXMS server without the use of agents on the monitored service ?

Best regards,
David
Title: Re: Cannot figure web site monitor
Post by: DH on May 16, 2012, 08:14:35 PM
Hi,

I have now discovered ServiceCheck.HTTP() , however if copy the example (below) into the DCI I get 'unable to create new data collection item: invalid argument' , I've quotes around what are likely to be strings, reduced the test expression to "*" but cannot create the item. Anyone point me in the right direction ?

ServiceCheck.HTTP(159.148.208.90,80,/index.html,www.netxms.org,"^HTTP/1\.[01] 200.*")

Reagrds,
David
Title: Re: Cannot figure web site monitor
Post by: Victor Kirhenshtein on May 16, 2012, 09:00:23 PM
Hi!

If you create a network service, it is checked from agent on poller node (default poller node is management server itself). So, if you create service "http" on node A and set poller node property of that service to node B, server will connect to agent on node B which in turn will attempt to connect to service on node A.
Agent on poller node must have portcheck subagent to be loaded. You can load it by adding

SubAgent = portcheck.nsm

to nxagentd.conf.

Best regards,
Victor
Title: Re: Cannot figure web site monitor
Post by: Victor Kirhenshtein on May 16, 2012, 09:01:58 PM
Quote from: David Hewison on May 16, 2012, 08:14:35 PM
I have now discovered ServiceCheck.HTTP() , however if copy the example (below) into the DCI I get 'unable to create new data collection item: invalid argument' , I've quotes around what are likely to be strings, reduced the test expression to "*" but cannot create the item. Anyone point me in the right direction ?

ServiceCheck.HTTP(159.148.208.90,80,/index.html,www.netxms.org,"^HTTP/1\.[01] 200.*")

It should not be related to parameter syntax, server is not checking it. What version of server and console you are using? Also, can you send me screenshot of your DCI configuration?

Best regards,
Victor
Title: Re: Cannot figure web site monitor
Post by: DH on May 17, 2012, 02:24:18 PM
Hi Victor,

Thanks for your help.

I am using version 1.2 of the management server and consoles. I was using the 'Legacy console' when I got the 'invalid argument' error, in light of your comment above I tried the new console (java?) and it accepted the same arguments that the legacy console rejected. So now I have a little bit more knowledge I will go and play with it and see if I can get it to work.
Thanks for your patience an assistance.

Regards,
David Hewison