Child pages
  • Disk Usage Metrics Template
Skip to end of metadata
Go to start of metadata

Introduction

This page documents a template which renders data from our disk usage Sensu checks.

The example here is for the root volume.  For non-root volumes, add the mount point to the name after "root."  For example, for /boot, disk.usage.root.used becomes disk.usage.root.boot.used.

Template

The template as valid JSON is below.

    "Root Partition Used vs Differential": {
        "areaAlpha": 0.75,
        "areaMode": "all",
        "target": [
            {
                "alias": [
                    {
                        "metric": [
                            "disk.usage.root.used"
                        ]
                    },
                    "Disk Used (MB)"
                ]
            },
            {
                "alias": [
                    {
                        "secondYAxis": [
                            {
                                "derivative": [
                                    {
                                        "metric": [
                                            "disk.usage.root.used"
                                        ]
                                    }
                                ]
                            }
                        ]
                    },
                    "Usage differential (MB/m)"
                ]
            }
        ]
    },
    "Root Partition Used vs Free": {
        "areaAlpha": 0.75,
        "areaMode": "all",
        "target": [
            {
                "alias": [
                    {
                        "metric": [
                            "disk.usage.root.used"
                        ]
                    },
                    "Disk Used (MB)"
                ]
            },
            {
                "alias": [
                    {
                        "metric": [
                            "disk.usage.root.avail"
                        ]
                    },
                    "Disk Free (MB)"
                ]
            },
            {
                "alias": [
                    {
                        "secondYAxis": [
                            {
                                "metric": [
                                    "disk.usage.root.used_percentage"
                                ]
                            }
                        ]
                    },
                    "Disk Used (Percent)"
                ]
            }
        ]
    }
 

Using this template

To apply this template, click the "edit" link on the Managed Device Metrics box when in "View Device" for the device which provides the metrics. Add this template to the list of templates in the JSON data structure. Note that it should come before the final curly brace ( } ), and a comma should be added to the end of the previous metric in order for the JSON to be valid.

  • No labels