Hello!
To monitor web services, you have two options, depending on your installation:
First option - if you have added machine hosting web server in question to NetXMS as node object.
1) Create "Service" object under your web server's node object
2) Select service type "HTTP"
3) As a request, enter HOST_HEADER:REQUEST_URI, for example, to test URL https://www.netxms.org/index.html enter www.netxms.org:/index.html
4) In a response field, enter regular expression to match server's answer. Below are some examples:
4.1) Just test for code 200 (OK):
^HTTP/1\.[01] 200.*
4.2) To test that server returns code 200 and that page's content has word "netxms":
^HTTP/1\.[01] 200.*netxms.*
Second option - if you don't enter your web server as a node into NetXMS (for example, you wish to check www.ibm.com without creating a node object in your NetXMS database)
1) For the node object representing your NetXMS server, add the following DCI (source - NetXMS agent):
ServiceCheck.HTTP(server_ip_address,port,uri,host_header,response)
For example, to check https://www.netxms.org/index.html just to code 200, use
ServiceCheck.HTTP(159.148.208.90,80,/index.html,www.netxms.org,"^HTTP/1\.[01] 200.*")
This parameter will return the following values:
0 - success (server was connected and return expected response)
1 - invalid arguments was passed (most likely regular expression has incorrect syntax)
2 - cannot connect to server
3 - bad server's response
So you can set threshold for non-zero values and process it.
Please node that you need portchecker subagent to be loaded on machine running NetXMS server. On Windows installation this is default, but on UNIX you should ensure that you have something like
SubAgent = /usr/local/lib/libnsm_portCheck.so
in your agent's configuration file.
Hope this helps!
Best regards,
Victor
To monitor web services, you have two options, depending on your installation:
First option - if you have added machine hosting web server in question to NetXMS as node object.
1) Create "Service" object under your web server's node object
2) Select service type "HTTP"
3) As a request, enter HOST_HEADER:REQUEST_URI, for example, to test URL https://www.netxms.org/index.html enter www.netxms.org:/index.html
4) In a response field, enter regular expression to match server's answer. Below are some examples:
4.1) Just test for code 200 (OK):
^HTTP/1\.[01] 200.*
4.2) To test that server returns code 200 and that page's content has word "netxms":
^HTTP/1\.[01] 200.*netxms.*
Second option - if you don't enter your web server as a node into NetXMS (for example, you wish to check www.ibm.com without creating a node object in your NetXMS database)
1) For the node object representing your NetXMS server, add the following DCI (source - NetXMS agent):
ServiceCheck.HTTP(server_ip_address,port,uri,host_header,response)
For example, to check https://www.netxms.org/index.html just to code 200, use
ServiceCheck.HTTP(159.148.208.90,80,/index.html,www.netxms.org,"^HTTP/1\.[01] 200.*")
This parameter will return the following values:
0 - success (server was connected and return expected response)
1 - invalid arguments was passed (most likely regular expression has incorrect syntax)
2 - cannot connect to server
3 - bad server's response
So you can set threshold for non-zero values and process it.
Please node that you need portchecker subagent to be loaded on machine running NetXMS server. On Windows installation this is default, but on UNIX you should ensure that you have something like
SubAgent = /usr/local/lib/libnsm_portCheck.so
in your agent's configuration file.
Hope this helps!
Best regards,
Victor