Skip to main content

Linux Process Monitoring

You can configure MetricsHub to monitor a Linux process. In the example below, we configured MetricsHub to monitor the systemd process running on the prod-web resource using SSH.

Procedure

To achieve this use case, we:

  • Declare the resource to be monitored (prod-web)​ and its attributes (host.name, host.type)​

    resources:
    prod-web:
    attributes:
    host.name: prod-web
    host.type: linux
  • Configure the SSH protocol with credentials and timeout​

        protocols:
    ssh:
    username: USERNAME
    password: PASSWORD
    timeout: 30
  • Add a new instance of the LinuxProcess connector for the monitoring of systemd. Name this new instance systemdProcess, for example:

        additionalConnectors:
    systemdProcess:
    uses: LinuxProcess
  • Set the variable matchName for the service to be monitored (systemd):

            variables:
    matchName: systemd

Here is the complete YAML configuration:

resources:
prod-web:
attributes:
host.name: prod-web
host.type: linux
protocols:
ssh:
username: USERNAME
password: USERNAME
timeout: 30
additionalConnectors:
systemdProcess:
uses: LinuxProcess
variables:
matchName: systemd

Supporting Resources