Author Topic: Cannot figure web site monitor  (Read 5230 times)

DH

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Cannot figure web site monitor
« 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

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 7137
    • View Profile
Re: Cannot figure web site monitor
« Reply #1 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

DH

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Cannot figure web site monitor
« Reply #2 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

DH

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Cannot figure web site monitor
« Reply #3 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

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 7137
    • View Profile
Re: Cannot figure web site monitor
« Reply #4 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

Victor Kirhenshtein

  • Lead Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 7137
    • View Profile
Re: Cannot figure web site monitor
« Reply #5 on: May 16, 2012, 09:01:58 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

DH

  • Jr. Member
  • **
  • Posts: 63
    • View Profile
Re: Cannot figure web site monitor
« Reply #6 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