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. Web Site monitoring

Web Site monitoring

Scheduled Pinned Locked Moved Support
18 Posts 6 Posters 46.7k 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.
  • B
    B
    bsadler
    wrote on last edited by
    #1

    I have just set up NetXMS for the first time, and I must say I am very impressed!

    So far I have not run into any problems with monitoring various servers, but I do have one question about monitoring web sites:

    I have a cluster of web servers that run a few different domains, and I would like to check that certain pages load periodically.

    How is this done using NetXMS?  I've looked through the manual, and even played around with 'Services' a bit, but I can't quite seem to get a grasp on what the request and response fields should contain (I have tried URLs and response codes, but for some reason when I set the service to expect a response code of 200 from a server that does not even exist it returns a good status!).

    Thanks in advance,

    Blain

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • V
        V
        Victor Kirhenshtein
        wrote on last edited by
        #3

        Hello again!

        Please note that starting from version 0.2.15, you can also calculate checksum of web pages - this gives you an ability to detect page changes. To get web page checksum, you should load ECS (Extended Checksum) subagent on the node from which you wish to control web page, and then add DCI like below to that node:

        ECS.HttpSHA1(URL)

        for example, to calculate checksum of www.netxms.org main page, use

        ECS.HttpSHA1(https://www.netxms.org)

        You will get SHA1 hash for page as a string. You can set threshold on DCI to detect changes in a checksum and process raised events.

        Best regards,
        Victor

        1 Reply Last reply
        0
        • B
          B
          bsadler
          wrote on last edited by
          #4

          Victor,

          Thank you very much for your extremely helpful response!  I have tested out the first option, and it works perfectly.

          Cheers,

          Blain

          1 Reply Last reply
          0
          • A
            A
            Anth0ny
            wrote on last edited by
            #5

            Need comments for HOST_HEADER:REQUEST_URI

            REQUEST_URI - is it a required part of request?

            can i simple enter an URL? for example: www.netxms.org

            (вообще объект типа "Сервис" может существовать самостоятельно, без привязки к какой-то конкретной ноде? вдруг мне понадобилось мониторить интернет-сервер, который мне не пренадлежит... и как Ноду его создавать не хочется)

            1 Reply Last reply
            0
            • V
              V
              Victor Kirhenshtein
              wrote on last edited by
              #6

              No, you cannot use URL. For monitoring www.netxms.org, ypu should use request like

              www.netxms.org:/
              

              Service should be bound to node object. If you wish to check remote web server without creating node object, you can just create DCI for ServiceCheck.HTTP parameter on your management server and use normal threshold processing.

              Best regards,
              Victor

              P.S. Please use English or post questions in Russian forum. No offence, just reminder 🙂

              1 Reply Last reply
              0
              • A
                A
                Anth0ny
                wrote on last edited by
                #7

                @victor said:

                P.S. Please use English or post questions in Russian forum. No offence, just reminder 🙂

                I always follow to Community rules.
                And my previous posts aknowledge this 😃

                My message in russian only a comments, not a main thing.

                Thanks Viktor!
                😃

                1 Reply Last reply
                0
                • E
                  E
                  eldiablo14
                  wrote on last edited by
                  #8

                  Hello,

                  I want to monitor web pages but it doesnt work on my system as you mentioned above... What can be wrong ? :S

                  I'm really confused...

                  1 Reply Last reply
                  0
                  • V
                    V
                    Victor Kirhenshtein
                    wrote on last edited by
                    #9

                    Hi!

                    How do you monitor - via ServiceCheck.HTTP parameter or by creating network service object? What errors you get?

                    Best regards,
                    Victor

                    1 Reply Last reply
                    0
                    • E
                      E
                      eldiablo14
                      wrote on last edited by
                      #10

                      I've tried both of them. I also checked nxget prompt.

                      Each time I try, NetXMS says services are down so I can't see what's wrong there..

                      For example please tell me step by step how can i monitor www.google.com ?

                      Service type, I'm choosing HTTP
                      Bound to IP address, I choose " Any "

                      At Request/Respone tab,  I'm entering
                      www.google.com😕

                      Expected response, I'm entering
                      ^HTTP/1.[01] 200 .*

                      This way it says service is down but NetXMS server machine can resolve www.google.com in browsers. I'm in the office now and I'm behind a firewall but I don't think this will block it.

                      Please help me 😞

                      1 Reply Last reply
                      0
                      • E
                        E
                        eldiablo14
                        wrote on last edited by
                        #11

                        OK, now i can monitor web pages via DCI. But again there is a problem...

                        Web page is working and it's giving me a " 0 " value, so far good.. But when I try to test if it's working correctly it fails... I'm stopping apache service and waiting that if the value changes from 0 to 1,2,3 but no. Everytime I try to test, agent stops working and i can understand it from the last data collection, when i turn on the apache service again, agent starts to work (which i can see from the last data collection again)

                        This is interesting, any solutions for this ?

                        1 Reply Last reply
                        0
                        • E
                          E
                          eldiablo14
                          wrote on last edited by
                          #12

                          Finally my problem solved...

                          This time I uninstalled 0.2.31 agent and installed 0.2.30 agent... And it worked just like you said Victor.

                          You may consider this as a bug of 0.2.31 agent.

                          Thanks !

                          1 Reply Last reply
                          0
                          • V
                            V
                            Victor Kirhenshtein
                            wrote on last edited by
                            #13

                            Hi!

                            It's very strange. The only thing that was changed in port checker between 0.2.30 and 0.2.31 is that 0.2.31 has configurable connection timeout. On what platform you run port checker? Maybe it's platform-dependent bug.

                            Best regards,
                            Victor

                            1 Reply Last reply
                            0
                            • E
                              E
                              eldiablo14
                              wrote on last edited by
                              #14

                              Hi again,

                              Platform I use ; Windows 2003 Server Enterprise Edition SP1 32 Bit

                              1 Reply Last reply
                              0
                              • R
                                R
                                Rabid
                                wrote on last edited by
                                #15

                                I have a slight problem with using ServiceCheck.HTTP.  I am using 1.0.9 Console and 1.0.9 agent which is installed on a WinXP machine.  When I use the following string it works fine

                                someIP,80,/index.html,someURL,"^HTTP/1\.[01] 200.*"

                                where someIP is the IP of the someURL.  This will actually work correctly and if I change index.html to index2.html I get the correct response.  If I use the following string the agent ends unexpectedly.

                                someIP,80,/index.html,someURL,"^HTTP/1\.[01] 200.*randomWord.*"

                                where randomWord is located on index.html.  I just want to check for a random word located on the webpage.  Is the above the wrong syntax?

                                1 Reply Last reply
                                0
                                • V
                                  V
                                  Victor Kirhenshtein
                                  wrote on last edited by
                                  #16

                                  The syntax is correct, so it's looks like a bug. Could you please enable agent crash dump by adding

                                  CreateCrashDumps = yes
                                  DumpDirectory = <some writeable directory>
                                  

                                  to your nxagentd.conf and send generated mdmp and info files to dump-at-netxms.org?

                                  Best regards,
                                  Victor

                                  1 Reply Last reply
                                  0
                                  • E
                                    E
                                    edin
                                    wrote on last edited by
                                    #17

                                    Hi all,

                                    Sorry for 'wakeing' this topic up, but I have some problems. First, I don't understand this line:

                                    1. For the node object representing your NetXMS server, add the following DCI (source - NetXMS agent)

                                    Is that the web server where my websites to monitor are?
                                    And the second thing is that when I put this line in the parameter field:

                                    ServiceCheck.HTTP(server_ip_address,port,uri,host_header,response)

                                    and hit 'Query', nothing happens. Maybe it's because the wrong node, I don't know...

                                    Any help?

                                    Regards,
                                    Edin

                                    1 Reply Last reply
                                    0
                                    • E
                                      E
                                      edin
                                      wrote on last edited by
                                      #18

                                      ^ Anybody?

                                      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