Linux process monitoring
-
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 startin NetXms i tryed adding: DCI System.ProcessCount("nxagentd.service") but it returns as unsupported.
Any hints?

-
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
-
-
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.
-
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 -
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-countexYou can find the command line by running
px faxFiltering is done with the help of regular expression. You can test your regular expression here: https://regex101.com/
-
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.headleThen 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.ymlBut in NetXms i get 0 results no matter what formating i use in dci:
Process.CountEx("/kibana/", "\/kibana\/") -
First parameter of CountEx should be process name which is actually "node".
Try something like this:
Process.CountEx("node", "\/kibana\/") -
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