Use Cases
Monitoring a service running on Linux
MetricsHub makes it easy to monitor your services managed by systemd. To set up monitoring, we only need to specify a dedicated instance of the Linux - Service (systemctl) connector in the config/metricshub.yaml configuration file. Under this instance, we specify the name or the command line of the service to be monitored.
In the example below, we specify a dedicated instance of the  metricshubLinuxService connector (LinuxService) to monitor the metricshub service running on a Linux server.
Note: This page provides just one example of the data collection feature available in MetricsHub. For more information, refer to Customize Data Collection.
Procedure
To monitor the metricshub service running on Linux:
- 
In the config/metricshub.yamlfile, we configure the monitoring on a Linux machine throughSSH:resources: prod-web: attributes: host.name: [prod-web-01, prod-web-02] host.type: linux protocols: ssh: username: monagent password: REDACTED timeout: 30s
- 
We specify the httpddedicated instance of the Linux - Service (systemctl) connector:additionalConnectors: httpd: uses: LinuxService # Connector used
- 
We specify the service to be monitored: variables: serviceNames: httpd
Here is the complete YAML configuration to be added to config/metricshub.yaml to monitor the metricshub service running on Linux:
    resources:
      prod-web:
        attributes:
          host.name: [prod-web-01, prod-web-02]
          host.type: linux
        protocols:
          ssh:
            username: monagent
            password: REDACTED
            timeout: 30
        additionalConnectors:
          httpd:
            uses: LinuxService
            variables:
              serviceNames: httpd