Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Monitor Webservice - Can't get it working

Monitor Webservice - Can't get it working

Scheduled Pinned Locked Moved Support
6 Posts 2 Posters 21.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S
    S
    stoffmann
    wrote on last edited by
    #1

    Hi,

    I'm trying to monitor a webservice running on one of my already monitored servers. (replaced by <SERVERNAME> in the following)

    The address the service can be reached in a browser is: http://<SERVERNAME>:8683/BasicDataService/help

    I created a Network Service below the monitored servers node with the following parameters:

    Service Type: HTTP
    Port: 8683
    IP Address: tried empty and servers ip address
    Request: <SERVERNAME>:/BasicDataService/help
    Response: ^HTTP/1\.[01] 200.*
    Poller Node: default

    The agents configuration file on <SERVERNAME> looks like this:

    #
    # NetXMS agent configuration file
    # Created by agent installer at Thu Mar  5 10:38:03 2020
    #

    MasterServers = <NETXMSMASTERSERVER>
    ConfigIncludeDir = D:\Program Files\NetXMSAgent\etc\nxagentd.conf.d
    LogFile = D:\Program Files\NetXMSAgent\log\agent.log
    DebugLevel = 6
    FileStore = D:\Program Files\NetXMSAgent\var
    SubAgent = filemgr.nsm
    SubAgent = ping.nsm
    SubAgent = logwatch.nsm
    SubAgent = winperf.nsm
    SubAgent = wmi.nsm
    SubAgent = portcheck.nsm

    The service is always reported as "Not Responding"

    What am I doing wrong?

    Regards

    Stefan

    1 Reply Last reply
    0
    • F
      F
      Filipp Sudanov
      wrote on last edited by
      #2

      Network service is using portcheck subagent. This subagent provides a number or parameters that we can directly request for debugging purposes (https://www.netxms.org/documentation/adminguide/service-monitoring.html#portcheck-configuration).

      So you can try on the server:

      nxget <agent_ip_address> 'ServiceCheck.HTTP(www.google.com,80,/)'
      

      The possible responses are:
      0 Success, connection to target was established and expected response was received.
      1 Invalid arguments were passed.
      2 Cannot connect to target.
      3 Invalid / Unexpected response from target

      For response = 3 Portcheck can save HTTP server reply in a file that can be inspected to understand if the regex is wrong. For this to happen the following should be specified in agent config:

      [portcheck]
      FailedDirectory=/tmp/
      
      1 Reply Last reply
      0
      • S
        S
        stoffmann
        wrote on last edited by
        #3

        Thank You for Your reply. I think I'm a step further know.
        The portcheck log tells me the following:

        HTTP/1.1 401 Unauthorized
        Content-Length: 0
        Server: Microsoft-HTTPAPI/2.0
        WWW-Authenticate: NTLM
        Date: Mon, 23 Mar 2020 10:51:21 GMT
        Connection: close
        

        So it looks like an authentication problem. Which credentials is NetXMS using? Can I change them somwhere?
        I have to use NTLM for authentication.

        Thanks in advance

        1 Reply Last reply
        0
        • S
          S
          stoffmann
          wrote on last edited by
          #4

          I investigated further and found out the when I use Powershell to test the service like this:

          Invoke-WebRequest -uri http://myserver.net:8683/BasicDataService/help/operations/GetDatabases -UseDefaultCredentials

          I have to use the -UseDefaultCredentials, otherwise I alo get error 401 Unauthorized. So ist mußt have to do with authentication.
          Howx can I change authentication for NetXMS Webservice monitoring?

          1 Reply Last reply
          0
          • F
            F
            Filipp Sudanov
            wrote on last edited by
            #5

            Portcheck subagent does not support authentication. There's another subagent - netsvc - that is based on libcurl and supports authentication by specifying address like: proto://user:pass@host
            The difference is that it's not possible to use netsvc as data source for "Network service". The only way to access netsvc is to create a DCI.

            1 Reply Last reply
            0
            • S
              S
              stoffmann
              wrote on last edited by
              #6

              OK, I will try this. Thanks

              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              Powered by NodeBB Contributors
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups