Type to search.

System service metricset

Serverless

Elastic Cloud Serverless projects are autoscaled environments, fully managed by Elastic and available on Elastic Cloud.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

Serverless interfaces and procedures might differ from classic Elastic Stack deployments.

Stack

The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

The service metricset reports on the status of systemd services.

This metricset is available on:

  • Linux

If systemd resource accounting is enabled, this metricset will report any resources tracked by systemd. On most distributions, tasks and memory are the only resources with accounting enabled by default. For more information, see the systemd manual pages.

service.state_filter - A list of service states to filter by. This can be any of the states or sub-states known to systemd. service.pattern_filter - A list of glob patterns to filter service names by. This is an "or" filter, and will report any systemd unit that matches at least one filter pattern.

The system service metricset comes with a predefined dashboard. For example:

metricbeat services host

For a description of each field in the metricset, see the exported fields section.

Here is an example document generated by this metricset:

JSON
{
    "@timestamp": "2017-10-12T08:05:34.853Z",
    "event": {
        "dataset": "system.service",
        "duration": 115000,
        "module": "system"
    },
    "metricset": {
        "name": "service",
        "period": 10000
    },
    "process": {
        "exit_code": 0,
        "pid": 259
    },
    "service": {
        "type": "system"
    },
    "system": {
        "service": {
            "exec_code": "exited",
            "load_state": "loaded",
            "name": "dracut-pre-udev.service",
            "state": "inactive",
            "state_since": "2020-08-26T18:05:23.525244-07:00",
            "sub_state": "dead",
            "unit_file": {
                "state": "static",
                "vendor_preset": "disabled"
            }
        }
    },
    "systemd": {
        "fragment_path": "/usr/lib/dracut/modules.d/98dracut-systemd/dracut-pre-udev.service",
        "unit": "dracut-pre-udev.service"
    }
}