Quick processes monitoring solution and README update.
This commit is contained in:
parent
11182d4caa
commit
7496431da3
10
README.md
10
README.md
@ -3,3 +3,13 @@
|
||||
This repository contains a collection of useful things for NetXMS, like templates and helper scripts. Each template is suitable to be imported into NetXMS server using "Tools" -> "Import configuration".
|
||||
|
||||
Each subdirectory might contain own README file.
|
||||
|
||||
## What is here
|
||||
|
||||
| Name | Description |
|
||||
| -------------------- | ----------- |
|
||||
| [MySQL - generic data](/templates/mysql/generic) | Monitors generic MySQL things. |
|
||||
| [MySQL - InnoDB](/templates/mysql/innodb) | Monitors InnoDB-related parameters. |
|
||||
| [MySQL - MyISAM](/templates/mysql/myisam) | Monitors MyISAM-related parameters. |
|
||||
| [PostgreSQL](/templates/postgresql) | Monitors PostgreSQL server and databases. |
|
||||
| [Processes - monitor by ProcessesToMonitor list](/templates/processes/monitor-by-processestomonitor-list) | Quick start with processes monitoring using helper script. |
|
||||
|
@ -0,0 +1,27 @@
|
||||
# Monitor processes using custom "ProcessesToMonitor" list
|
||||
|
||||
This directory contains everything that is needed to start monitoring your processes quick.
|
||||
|
||||
## A warning about regular expressions
|
||||
|
||||
Template is using regular expressions instead of binary's name. Keep in mind that your regular expression might capture unneeded data!
|
||||
|
||||
## Helper script
|
||||
|
||||
Copy script to your server and made it executable with `chmod +x /path/to/script`.
|
||||
|
||||
Fix `PROCESSES` array to contain everything you need to monitor (**while keeping in mind a warning about regular expressions above!**)
|
||||
|
||||
## Configure nxagent
|
||||
|
||||
To export data produced by helper script as list into NetXMS you should add this line into `/etc/nxagentd.conf`:
|
||||
|
||||
```
|
||||
ExternalList=ProcessesToMonitor:/path/to/script.sh
|
||||
```
|
||||
|
||||
**Don't forget to restart NetXMS agent!**
|
||||
|
||||
## Poll
|
||||
|
||||
Apply template on node(s) and execute "Instance discovery" polling option.
|
@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
PROCESSES=("process1", "process2", "a.*process.*with.*regexp")
|
||||
|
||||
for process in ${PROCESSES[@]}; do
|
||||
echo -e "${process}"
|
||||
done
|
@ -0,0 +1,252 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<formatVersion>4</formatVersion>
|
||||
<server>
|
||||
<version>3.5.136</version>
|
||||
<buildTag>3.5-136-g37db5ea3c4</buildTag>
|
||||
<operatingSystem>Linux 4.19.0-12-amd64</operatingSystem>
|
||||
</server>
|
||||
<description></description>
|
||||
<events>
|
||||
<event id="100023">
|
||||
<guid>3c9d6c4c-2ad8-40e1-a8e7-e5c865b07052</guid>
|
||||
<name>OS_PROCESS_NOT_RUNNING</name>
|
||||
<code>100023</code>
|
||||
<description></description>
|
||||
<severity>3</severity>
|
||||
<flags>1</flags>
|
||||
<message>Process %6 is not running</message>
|
||||
<tags></tags>
|
||||
</event>
|
||||
</events>
|
||||
<templates>
|
||||
<template id="337">
|
||||
<guid>58732c04-0d81-4ba0-9d1a-97e3e5e53a3b</guid>
|
||||
<name>Monitor by ProcessesToMonitor list</name>
|
||||
<flags>0</flags>
|
||||
<comments></comments>
|
||||
<path>
|
||||
<element id="1">Applications</element>
|
||||
</path>
|
||||
<dataCollection>
|
||||
<dci id="4052">
|
||||
<guid>4bac1972-e179-4467-acc2-7b9dca6c1e6c</guid>
|
||||
<name>Process.CountEx(,".*{instance}.*")</name>
|
||||
<description>Number of {instance} processes</description>
|
||||
<dataType>1</dataType>
|
||||
<samples>0</samples>
|
||||
<origin>1</origin>
|
||||
<scheduleType>0</scheduleType>
|
||||
<interval></interval>
|
||||
<retentionType>0</retentionType>
|
||||
<retention></retention>
|
||||
<instance></instance>
|
||||
<systemTag></systemTag>
|
||||
<delta>0</delta>
|
||||
<flags>0</flags>
|
||||
<snmpRawValueType>0</snmpRawValueType>
|
||||
<snmpPort>0</snmpPort>
|
||||
<snmpVersion>127</snmpVersion>
|
||||
<instanceDiscoveryMethod>1</instanceDiscoveryMethod>
|
||||
<instanceRetentionTime>-1</instanceRetentionTime>
|
||||
<comments></comments>
|
||||
<isDisabled>false</isDisabled>
|
||||
<transformation></transformation>
|
||||
<thresholds>
|
||||
<threshold id="1">
|
||||
<function>0</function>
|
||||
<condition>0</condition>
|
||||
<value>1</value>
|
||||
<activationEvent>OS_PROCESS_NOT_RUNNING</activationEvent>
|
||||
<deactivationEvent>SYS_THRESHOLD_REARMED</deactivationEvent>
|
||||
<sampleCount>2</sampleCount>
|
||||
<repeatInterval>-1</repeatInterval>
|
||||
<script></script>
|
||||
</threshold>
|
||||
</thresholds>
|
||||
<perfTabSettings><config>
 <enabled>false</enabled>
 <autoScale>true</autoScale>
 <logScaleEnabled>false</logScaleEnabled>
 <stacked>false</stacked>
 <showLegendAlways>false</showLegendAlways>
 <extendedLegend>true</extendedLegend>
 <minYScaleValue>0.0</minYScaleValue>
 <maxYScaleValue>100.0</maxYScaleValue>
 <timeRange>1</timeRange>
 <timeUnits>1</timeUnits>
 <type>0</type>
 <color>49152</color>
 <title></title>
 <name></name>
 <showThresholds>false</showThresholds>
 <groupName></groupName>
 <order>100</order>
 <parentDciId>0</parentDciId>
 <modifyYBase>false</modifyYBase>
 <invertedValues>false</invertedValues>
</config></perfTabSettings>
|
||||
<instanceDiscoveryData>ProcessesToMonitor</instanceDiscoveryData>
|
||||
<instanceFilter></instanceFilter>
|
||||
</dci>
|
||||
<dci id="4053">
|
||||
<guid>e75f4a79-a622-4a49-829d-dfdaaede4605</guid>
|
||||
<name>Process.CPUTime(,,".*{instance}.*")</name>
|
||||
<description>CPU usage for process {instance}</description>
|
||||
<dataType>5</dataType>
|
||||
<samples>0</samples>
|
||||
<origin>1</origin>
|
||||
<scheduleType>0</scheduleType>
|
||||
<interval></interval>
|
||||
<retentionType>0</retentionType>
|
||||
<retention></retention>
|
||||
<instance></instance>
|
||||
<systemTag></systemTag>
|
||||
<delta>2</delta>
|
||||
<flags>0</flags>
|
||||
<snmpRawValueType>0</snmpRawValueType>
|
||||
<snmpPort>0</snmpPort>
|
||||
<snmpVersion>127</snmpVersion>
|
||||
<instanceDiscoveryMethod>1</instanceDiscoveryMethod>
|
||||
<instanceRetentionTime>-1</instanceRetentionTime>
|
||||
<comments></comments>
|
||||
<isDisabled>false</isDisabled>
|
||||
<transformation>return $1 / 10.0;</transformation>
|
||||
<perfTabSettings><config>
 <enabled>false</enabled>
 <autoScale>true</autoScale>
 <logScaleEnabled>false</logScaleEnabled>
 <stacked>false</stacked>
 <showLegendAlways>false</showLegendAlways>
 <extendedLegend>true</extendedLegend>
 <minYScaleValue>0.0</minYScaleValue>
 <maxYScaleValue>100.0</maxYScaleValue>
 <timeRange>1</timeRange>
 <timeUnits>1</timeUnits>
 <type>0</type>
 <color>49152</color>
 <title></title>
 <name></name>
 <showThresholds>false</showThresholds>
 <groupName></groupName>
 <order>100</order>
 <parentDciId>0</parentDciId>
 <modifyYBase>false</modifyYBase>
 <invertedValues>false</invertedValues>
</config></perfTabSettings>
|
||||
<instanceDiscoveryData>ProcessesToMonitor</instanceDiscoveryData>
|
||||
<instanceFilter></instanceFilter>
|
||||
</dci>
|
||||
<dci id="4054">
|
||||
<guid>802b241d-f296-4293-bc2d-a4350551e8f2</guid>
|
||||
<name>Process.Threads(,,".*{instance}.*")</name>
|
||||
<description>Number of threads in process {instance}</description>
|
||||
<dataType>1</dataType>
|
||||
<samples>0</samples>
|
||||
<origin>1</origin>
|
||||
<scheduleType>0</scheduleType>
|
||||
<interval></interval>
|
||||
<retentionType>0</retentionType>
|
||||
<retention></retention>
|
||||
<instance></instance>
|
||||
<systemTag></systemTag>
|
||||
<delta>0</delta>
|
||||
<flags>0</flags>
|
||||
<snmpRawValueType>0</snmpRawValueType>
|
||||
<snmpPort>0</snmpPort>
|
||||
<snmpVersion>127</snmpVersion>
|
||||
<instanceDiscoveryMethod>1</instanceDiscoveryMethod>
|
||||
<instanceRetentionTime>-1</instanceRetentionTime>
|
||||
<comments></comments>
|
||||
<isDisabled>false</isDisabled>
|
||||
<transformation></transformation>
|
||||
<perfTabSettings><config>
 <enabled>false</enabled>
 <autoScale>true</autoScale>
 <logScaleEnabled>false</logScaleEnabled>
 <stacked>false</stacked>
 <showLegendAlways>false</showLegendAlways>
 <extendedLegend>true</extendedLegend>
 <minYScaleValue>0.0</minYScaleValue>
 <maxYScaleValue>100.0</maxYScaleValue>
 <timeRange>1</timeRange>
 <timeUnits>1</timeUnits>
 <type>0</type>
 <color>49152</color>
 <title></title>
 <name></name>
 <showThresholds>false</showThresholds>
 <groupName></groupName>
 <order>100</order>
 <parentDciId>0</parentDciId>
 <modifyYBase>false</modifyYBase>
 <invertedValues>false</invertedValues>
</config></perfTabSettings>
|
||||
<instanceDiscoveryData>ProcessesToMonitor</instanceDiscoveryData>
|
||||
<instanceFilter></instanceFilter>
|
||||
</dci>
|
||||
<dci id="4055">
|
||||
<guid>bc02e209-d503-4e2c-a796-d1ba0a374659</guid>
|
||||
<name>Process.WkSet(,,".*{instance}.*")</name>
|
||||
<description>Physical memory used by process {instance}</description>
|
||||
<dataType>2</dataType>
|
||||
<samples>0</samples>
|
||||
<origin>1</origin>
|
||||
<scheduleType>0</scheduleType>
|
||||
<interval></interval>
|
||||
<retentionType>0</retentionType>
|
||||
<retention></retention>
|
||||
<instance></instance>
|
||||
<systemTag></systemTag>
|
||||
<delta>0</delta>
|
||||
<flags>0</flags>
|
||||
<snmpRawValueType>0</snmpRawValueType>
|
||||
<snmpPort>0</snmpPort>
|
||||
<snmpVersion>127</snmpVersion>
|
||||
<instanceDiscoveryMethod>1</instanceDiscoveryMethod>
|
||||
<instanceRetentionTime>-1</instanceRetentionTime>
|
||||
<comments></comments>
|
||||
<isDisabled>false</isDisabled>
|
||||
<transformation></transformation>
|
||||
<perfTabSettings><config>
 <enabled>false</enabled>
 <autoScale>true</autoScale>
 <logScaleEnabled>false</logScaleEnabled>
 <stacked>false</stacked>
 <showLegendAlways>false</showLegendAlways>
 <extendedLegend>true</extendedLegend>
 <minYScaleValue>0.0</minYScaleValue>
 <maxYScaleValue>100.0</maxYScaleValue>
 <timeRange>1</timeRange>
 <timeUnits>1</timeUnits>
 <type>0</type>
 <color>49152</color>
 <title></title>
 <name></name>
 <showThresholds>false</showThresholds>
 <groupName></groupName>
 <order>100</order>
 <parentDciId>0</parentDciId>
 <modifyYBase>false</modifyYBase>
 <invertedValues>false</invertedValues>
</config></perfTabSettings>
|
||||
<instanceDiscoveryData>ProcessesToMonitor</instanceDiscoveryData>
|
||||
<instanceFilter></instanceFilter>
|
||||
</dci>
|
||||
<dci id="4092">
|
||||
<guid>f0786788-b285-45b8-9a1f-7aec7546220e</guid>
|
||||
<name>Process.Handles(,,".*{instance}.*")</name>
|
||||
<description>Number of handles in process {instance}</description>
|
||||
<dataType>1</dataType>
|
||||
<samples>0</samples>
|
||||
<origin>1</origin>
|
||||
<scheduleType>0</scheduleType>
|
||||
<interval></interval>
|
||||
<retentionType>0</retentionType>
|
||||
<retention></retention>
|
||||
<instance></instance>
|
||||
<systemTag></systemTag>
|
||||
<delta>0</delta>
|
||||
<flags>0</flags>
|
||||
<snmpRawValueType>0</snmpRawValueType>
|
||||
<snmpPort>0</snmpPort>
|
||||
<snmpVersion>127</snmpVersion>
|
||||
<instanceDiscoveryMethod>1</instanceDiscoveryMethod>
|
||||
<instanceRetentionTime>-1</instanceRetentionTime>
|
||||
<comments></comments>
|
||||
<isDisabled>false</isDisabled>
|
||||
<transformation></transformation>
|
||||
<perfTabSettings><config>
 <enabled>false</enabled>
 <autoScale>true</autoScale>
 <logScaleEnabled>false</logScaleEnabled>
 <stacked>false</stacked>
 <showLegendAlways>false</showLegendAlways>
 <extendedLegend>true</extendedLegend>
 <minYScaleValue>0.0</minYScaleValue>
 <maxYScaleValue>100.0</maxYScaleValue>
 <timeRange>1</timeRange>
 <timeUnits>1</timeUnits>
 <type>0</type>
 <color>49152</color>
 <title></title>
 <name></name>
 <showThresholds>false</showThresholds>
 <groupName></groupName>
 <order>100</order>
 <parentDciId>0</parentDciId>
 <modifyYBase>false</modifyYBase>
 <invertedValues>false</invertedValues>
</config></perfTabSettings>
|
||||
<instanceDiscoveryData>ProcessesToMonitor</instanceDiscoveryData>
|
||||
<instanceFilter></instanceFilter>
|
||||
</dci>
|
||||
<dci id="4093">
|
||||
<guid>b93c5f59-e6f5-47b9-ae12-d14e48ac9fc5</guid>
|
||||
<name>Process.PageFaults(,,".*{instance}.*")</name>
|
||||
<description>Page faults for process {instance}</description>
|
||||
<dataType>8</dataType>
|
||||
<samples>0</samples>
|
||||
<origin>1</origin>
|
||||
<scheduleType>0</scheduleType>
|
||||
<interval></interval>
|
||||
<retentionType>0</retentionType>
|
||||
<retention></retention>
|
||||
<instance></instance>
|
||||
<systemTag></systemTag>
|
||||
<delta>2</delta>
|
||||
<flags>0</flags>
|
||||
<snmpRawValueType>0</snmpRawValueType>
|
||||
<snmpPort>0</snmpPort>
|
||||
<snmpVersion>127</snmpVersion>
|
||||
<instanceDiscoveryMethod>1</instanceDiscoveryMethod>
|
||||
<instanceRetentionTime>-1</instanceRetentionTime>
|
||||
<comments></comments>
|
||||
<isDisabled>false</isDisabled>
|
||||
<transformation></transformation>
|
||||
<perfTabSettings><config>
 <enabled>false</enabled>
 <autoScale>true</autoScale>
 <logScaleEnabled>false</logScaleEnabled>
 <stacked>false</stacked>
 <showLegendAlways>false</showLegendAlways>
 <extendedLegend>true</extendedLegend>
 <minYScaleValue>0.0</minYScaleValue>
 <maxYScaleValue>100.0</maxYScaleValue>
 <timeRange>1</timeRange>
 <timeUnits>1</timeUnits>
 <type>0</type>
 <color>49152</color>
 <title></title>
 <name></name>
 <showThresholds>false</showThresholds>
 <groupName></groupName>
 <order>100</order>
 <parentDciId>0</parentDciId>
 <modifyYBase>false</modifyYBase>
 <invertedValues>false</invertedValues>
</config></perfTabSettings>
|
||||
<instanceDiscoveryData>ProcessesToMonitor</instanceDiscoveryData>
|
||||
<instanceFilter></instanceFilter>
|
||||
</dci>
|
||||
<dci id="4094">
|
||||
<guid>a71a7551-eb87-4579-9cc8-7561d38c04f6</guid>
|
||||
<name>Process.VMSize(,,".*{instance}.*")</name>
|
||||
<description>Virtual memory used by process {instance}</description>
|
||||
<dataType>2</dataType>
|
||||
<samples>0</samples>
|
||||
<origin>1</origin>
|
||||
<scheduleType>0</scheduleType>
|
||||
<interval></interval>
|
||||
<retentionType>0</retentionType>
|
||||
<retention></retention>
|
||||
<instance></instance>
|
||||
<systemTag></systemTag>
|
||||
<delta>0</delta>
|
||||
<flags>0</flags>
|
||||
<snmpRawValueType>0</snmpRawValueType>
|
||||
<snmpPort>0</snmpPort>
|
||||
<snmpVersion>127</snmpVersion>
|
||||
<instanceDiscoveryMethod>1</instanceDiscoveryMethod>
|
||||
<instanceRetentionTime>-1</instanceRetentionTime>
|
||||
<comments></comments>
|
||||
<isDisabled>false</isDisabled>
|
||||
<transformation></transformation>
|
||||
<perfTabSettings><config>
 <enabled>false</enabled>
 <autoScale>true</autoScale>
 <logScaleEnabled>false</logScaleEnabled>
 <stacked>false</stacked>
 <showLegendAlways>false</showLegendAlways>
 <extendedLegend>true</extendedLegend>
 <minYScaleValue>0.0</minYScaleValue>
 <maxYScaleValue>100.0</maxYScaleValue>
 <timeRange>1</timeRange>
 <timeUnits>1</timeUnits>
 <type>0</type>
 <color>49152</color>
 <title></title>
 <name></name>
 <showThresholds>false</showThresholds>
 <groupName></groupName>
 <order>100</order>
 <parentDciId>0</parentDciId>
 <modifyYBase>false</modifyYBase>
 <invertedValues>false</invertedValues>
</config></perfTabSettings>
|
||||
<instanceDiscoveryData>ProcessesToMonitor</instanceDiscoveryData>
|
||||
<instanceFilter></instanceFilter>
|
||||
</dci>
|
||||
</dataCollection>
|
||||
<agentPolicies>
|
||||
</agentPolicies>
|
||||
</template>
|
||||
</templates>
|
||||
<traps>
|
||||
</traps>
|
||||
<rules>
|
||||
</rules>
|
||||
<scripts>
|
||||
</scripts>
|
||||
<objectTools>
|
||||
</objectTools>
|
||||
<dciSummaryTables>
|
||||
</dciSummaryTables>
|
||||
<actions>
|
||||
</actions>
|
||||
<webServiceDefinitions>
|
||||
</webServiceDefinitions>
|
||||
</configuration>
|
Loading…
Reference in New Issue
Block a user