How to monitor non-network services on Centos 7?

Started by ZacHow, December 27, 2018, 04:31:06 PM

Previous topic - Next topic

ZacHow

Hi,

My setup:
Windows server 2012 running NetXMS server (2.2.10)
Centos 7 VM running NetXMS Agent (2.2.10)

On the management console, to monitor a Windows service, we just add "System.servicestate(ServiceName)" and set the expected value. (as shown in attached)

This works fine if the server running the agent is Windows Server 2012/2016/2008R2, but not if the agent is running on a Centos 7 VM.

Any ideas? I've looked all over the forum and the guides but can't seem to find any info!

thanks!

Tursiops

I believe you'll have to create an ExternalParameter for that in your Linux agent configuration.
Something like the following should work (not pretty, I'm sure there's better ways):
ExternalParameter=System.LinuxService(*):service $1 status|grep Active|sed "s/.*Active: \(.*\) (.*/\1/"

Once you add that to your configuration (manually or via Agent Configuration Policy for any system determined to be running Linux and an Agent), you can reference it in your DCIs as System.LinuxService(<servicename>).

ZacHow

Quote from: Tursiops on December 28, 2018, 05:22:40 AM
I believe you'll have to create an ExternalParameter for that in your Linux agent configuration.
Something like the following should work (not pretty, I'm sure there's better ways):
ExternalParameter=System.LinuxService(*):service $1 status|grep Active|sed "s/.*Active: \(.*\) (.*/\1/"

Once you add that to your configuration (manually or via Agent Configuration Policy for any system determined to be running Linux and an Agent), you can reference it in your DCIs as System.LinuxService(<servicename>).

Thank you very much Tursiops! Worked perfectly. It's strange that this isn't in any of the official documentation, it should probably be added if possible.

Another, slightly more complicated question. We have 2 DB servers running Centos7 and MariaDB. Are there any known monitors for DataBase statistics on Centos7 / MariaDB? Is there any way we can achieve this?

Many thanks,

Zac. 

Victor Kirhenshtein

There is MySQL monitoring subagent, it could possibly work on MariaDB as well, but it seems to be not documented. You can get some information from it's source code here - https://github.com/netxms/netxms/tree/master/src/agent/subagents/mysql and I will ask next week to update administration guide as well.

Best regards,
Victor