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. Linux process monitoring

Linux process monitoring

Scheduled Pinned Locked Moved Support
9 Posts 3 Posters 81.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.
  • E
    E
    Egert143
    wrote on last edited by
    #1

    Hello

    Linux(ubuntu server edition) beginner here, In short i wanted to test ELK Stack and Netxms to monitor its state. Got elk running but i cant figure it out, how to monitor linux "services".

    i start them with commands:

    sudo systemctl start nxagentd.service
    sudo systemctl start elasticsearch.service
    sudo systemctl start kibana.service
    sudo systemctl start logstash.service
    sudo service keepalived start

    in NetXms i tryed adding: DCI System.ProcessCount("nxagentd.service") but it returns as unsupported.

    Any hints? šŸ™‚

    1 Reply Last reply
    0
    • G
      G
      gmonk63
      wrote on last edited by
      #2

      Not sure netxms would monitor all you need.Ā  Have you tried https://www.elastichq.org/features.htmlĀ  it does have an api that you could probly incorporate into netxms if really needed

      1 Reply Last reply
      0
      • E
        E
        Egert143
        wrote on last edited by
        #3

        Looks intresting il give it a try. But any hints on original question for simple service monitoring ? šŸ™‚

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

          nxagentd.service is the file name for systemd scripts, not the name of actual process. The process name is visible in command like top, ps, for netxms agent it's nxagentd.

          1 Reply Last reply
          0
          • E
            E
            Egert143
            wrote on last edited by
            #5

            For NetXms i got it working, but looking from "top" the ELK processes are all java, only different user.

              PID USER      PR  NI    VIRT    RES    SHR S %CPU %MEM     TIME+ COMMAND
            2462 elastic+  20   0 3379664 1.457g 173544 S  8.3 75.0  23:30.87 java
             3454 logstash  39  19 3318852 222712  12784 S  1.3 10.9   4:06.48 java
              922 kibana    20   0 1701224  62008   6984 S  0.7  3.0   4:01.10 node
            
            1 Reply Last reply
            0
            • F
              F
              Filipp Sudanov
              wrote on last edited by
              #6

              There is Process.CountEx() metric, that should allow to filter processes by the command line that was used to launch them.
              Ā https://www.netxms.org/documentation/adminguide/appendix.html#process-countex

              You can find the command line by running
              px fax

              Filtering is done with the help of regular expression. You can test your regular expression here: https://regex101.com/

              1 Reply Last reply
              0
              • E
                E
                Egert143
                wrote on last edited by
                #7

                Thanks for the tip. Gave it a try:

                From ps fox i got:

                  922 ?        Ssl   14:57 /usr/share/kibana/bin/../node/bin/node /usr/share/kibana/bin/../src/cli -c /etc/kibana/kibana.yml
                3454 ?        SNsl  14:49 /usr/bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -Djava.awt.headless=true -Dfile.
                 2462 ?        SLsl  49:45 /usr/share/elasticsearch/jdk/bin/java -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headle
                

                Then i played litle bit with regex tester:

                Match string and regex = \/kibana\/

                /usr/share/kibana/bin/../node/bin/node /usr/share/kibana/bin/../src/cli -c /etc/kibana/kibana.yml
                

                But in NetXms i get 0 results no matter what formating i use in dci:
                Ā Process.CountEx("/kibana/", "\/kibana\/")

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

                  First parameter of CountEx should be process name which is actually "node".
                  Try something like this:
                  Process.CountEx("node", "\/kibana\/")

                  1 Reply Last reply
                  0
                  • E
                    E
                    Egert143
                    wrote on last edited by
                    #9

                    Thanks, that worked. šŸ™‚

                    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