<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Monitoring ubuntu service status]]></title><description><![CDATA[<p dir="auto">Hello</p>
<p dir="auto">What are the steps to monitor ubuntu service status?</p>
<p dir="auto">Egert</p>
]]></description><link>https://forum.netxms.org/topic/8267/monitoring-ubuntu-service-status</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 07:40:35 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/8267.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 29 Sep 2025 05:52:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Monitoring ubuntu service status on Fri, 03 Oct 2025 13:43:50 GMT]]></title><description><![CDATA[<p dir="auto">At some point we will add built-in metric for systemd servicees (<a href="https://track.radensolutions.com/issue/NX-2841" rel="nofollow ugc">https://track.radensolutions.com/issue/NX-2841</a>)</p>
<p dir="auto">Currently this can be done by configuring ExternalMetric that would call systemctl show SERVICE_NAME --no-pager and pipe it to grep to get the status...<br />
or you can try the new agent functionality that parses xml or json data provided by external commands. It's called external data provider, documented here: <a href="https://netxms.org/documentation/adminguide/agent-management.html#externaldataprovider" rel="nofollow ugc">https://netxms.org/documentation/adminguide/agent-management.html#externaldataprovider</a></p>
<p dir="auto">Add the following to agent configuration file:</p>
<pre><code>### Data provider for systemd service information
[ExternalDataProvider/systemdServices]
Command = systemctl list-units --type service --full --all --output json --no-pager
Description = Data provider for systemctl json output
</code></pre>
<p dir="auto">agent will now have systemdServices() metric that supports jq query as parameter and here's example of metric to get status of cron service:</p>
<pre><code>systemdServices(".[]|select(.unit==""cron.service"")|.active")
</code></pre>
]]></description><link>https://forum.netxms.org/post/34887</link><guid isPermaLink="true">https://forum.netxms.org/post/34887</guid><dc:creator><![CDATA[Filipp Sudanov]]></dc:creator><pubDate>Fri, 03 Oct 2025 13:43:50 GMT</pubDate></item></channel></rss>