v1/health_configs

Use the v1/health_configs API to get a list of health configurations for your account, as well as modify or delete a health configuration.

URI

http://<hostname>/ws/v1/health_configs

Formats

HTTP Method Format Description
GET /ws/v1/health_configs Get a summary of the health_configs APIs.
GET /ws/v1/health_configs/inventory Get a list of all health configurations in your inventory.
GET, PUT, DELETE /ws/v1/health_configs/inventory/{id} Get, modify, or delete a named health configuration.

Fields

id

System-generated identifier for the device type to which the health_config applies.

Parameters

Name Type Description
cursor string Cursor to get the next page of health configurations. Omit on initial call.
size integer Number of items to return. The maximum and default is 1000.
replace boolean Boolean value that indicates whether to replace the current report configuration.True or Yes: Replace the current report configuration.False or No: Update the existing report configuration with changes.

© 2023 Digi International Inc. All rights reserved.

List Health Configurations

The following example shows how to get a list of all health configurations for your account.

Request

/ws/v1/health_configs/inventory

Response

Note Because each device health configuration applies to a single device type and itself, defines many rules and thresholds for multiple health metrics, the full output is not shown here. To see the full output, go to Documentation > API Explorer and send the v1/health_configs/List all health configs to see details for all health configurations and corresponding metrics on your system.

{
    "count": 8,
    "list": [
        {
            "customer_id": 57639,
            "enabled": true,
            "id": "FE00000A/DIGI TX64",
            "last_modified": "2022-04-06T23:21:23.246Z",
            "rules": [
                {
                    "categories": [
                        "Device"
                    ],
                    "description": "Internal temperature of system CPU core (Celsius) during the sample period",
                    "enabled": true,
                    "name": "Temperature (Core)",
                    "stream": "DataPoint/*/metrics/sys/core_temperature",
                    "threshold": {
                        "error": {
                            "ranges": [
                                {
                                    "lower": 70,
                                    "lower_bound_type": "CLOSED",
                                    "upper_bound_type": "CLOSED"
                                }
                            ]
                        },
                        "normal": {
                            "ranges": [
                                {
                                    "lower_bound_type": "CLOSED",
                                    "upper": 60,
                                    "upper_bound_type": "CLOSED"
                                }
                            ]
                        },
                        "warning": {
                            "ranges": [
                                {
                                    "lower": 60,
                                    "lower_bound_type": "OPEN",
                                    "upper": 70,
                                    "upper_bound_type": "OPEN"
                                }
                            ]
                        }
                    },
                    "type": "FLOAT",
                    "units": "Celsius"
                },
                {
                    "categories": [
                        "Device"
                    ],
                    "description": "Percentage of CPU used during the sample period",
                    "enabled": true,
                    "name": "CPU used",
                    "stream": "DataPoint/*/metrics/sys/cpu/used",
                    "threshold": {
                        "error": {
                            "ranges": [
                                {
                                    "lower": 95,
                                    "lower_bound_type": "CLOSED",
                                    "upper_bound_type": "CLOSED"
                                }
                            ]
                        },
                        "normal": {
                            "ranges": [
                                {
                                    "lower_bound_type": "CLOSED",
                                    "upper": 90,
                                    "upper_bound_type": "CLOSED"
                                }
                            ]
                        },
                        "warning": {
                            "ranges": [
                                {
                                    "lower": 90,
                                    "lower_bound_type": "OPEN",
                                    "upper": 95,
                                    "upper_bound_type": "OPEN"
                                }
                            ]
                        }
                    },
                    "type": "FLOAT",
                    "units": "%"
                },
                {
                    "categories": [
                        "Device"
                    ],
                    "description": "Percentage of memory used during the sample period",
                    "enabled": true,
                    "name": "Memory used",
                    "stream": "DataPoint/*/metrics/sys/mem/used",
                    "threshold": {
                        "error": {
                            "ranges": [
                                {
                                    "lower": 95,
                                    "lower_bound_type": "CLOSED",
                                    "upper_bound_type": "CLOSED"
                                }
                            ]
                        },
                        "normal": {
                            "ranges": [
                                {
                                    "lower_bound_type": "CLOSED",
                                    "upper": 90,
                                    "upper_bound_type": "CLOSED"
                                }
                            ]
                        },
                        "warning": {
                            "ranges": [
                                {
                                    "lower": 90,
                                    "lower_bound_type": "OPEN",
                                    "upper": 95,
                                    "upper_bound_type": "OPEN"
                                }
                            ]
                        }
                    },
                    "type": "FLOAT",
                    "units": "%"
                }
                ...etc..
            ]
        },
      ...etc...
    ],
    "size": 1000
}

© 2023 Digi International Inc. All rights reserved.

Get a Single Health Config

The following example shows how to get the health configuration FE00000A/Digi TX64 :

/ws/v1/health_configs/inventory/FE000002/Digi%20TX64

Response

{
    "customer_id": 57639,
    "enabled": true,
    "id": "FE00000A/DIGI TX64",
    "last_modified": "2022-04-06T23:21:23.246Z",
    "rules": [
        {
            "categories": [
                "mobile rx/tx"
            ],
            "description": "Mobile Network: number of bytes received on all interfaces during the sample period",
            "enabled": false,
            "name": "All mobile bytes received",
            "stream": "DataPoint/*/metrics/all/cellular/rx/bytes",
            "threshold": {
                "error": {
                    "ranges": [
                        {
                            "lower": 129600000000,
                            "lower_bound_type": "CLOSED",
                            "upper_bound_type": "CLOSED"
                        }
                    ]
                },
                "normal": {
                    "ranges": [
                        {
                            "lower_bound_type": "CLOSED",
                            "upper": 115200000000,
                            "upper_bound_type": "CLOSED"
                        }
                    ]
                },
                "warning": {
                    "ranges": [
                        {
                            "lower": 115200000000,
                            "lower_bound_type": "OPEN",
                            "upper": 129600000000,
                            "upper_bound_type": "OPEN"
                        }
                    ]
                }
            },
            "type": "LONG",
            "units": "bytes"
        },
      ...etc...
    ]
}

© 2023 Digi International Inc. All rights reserved.

Disable Health Config

Using the HTTP PUT method, the following example shows how to disable the health configuration FE00000A/Digi TX64.

Request

/ws/v1/health_configs/inventory/FE00000A/Digi%20TX64

Payload

{  
  "enabled": false, 
}

© 2023 Digi International Inc. All rights reserved.

Edit a Health Config

The following example shows how to change an existing Transport WR11 health configuration.

Request

/ws/v1/health_configs/inventory/FE000002/TRANSPORT WR11
{  
  "id": "FE000002/TRANSPORT WR11",
  "enabled": true, 
  "rules":[  
    {  
      "enabled":true,
      "stream":"DataPoint/*/metrics/sys/mem/free",
      "threshold":{  
        "error":{  
          "ranges":[  
            {  
              "upper":150000
            }
          ]
        },
        "warning":{  
          "ranges":[  
            {  
              "lower":150000,
              "upper":700000,
              "lower_bound_type":"OPEN",
              "upper_bound_type":"OPEN"
            }
          ]
        },
        "normal":{  
          "ranges":[  
            {  
              "lower":700000
            }
          ]
        }
      }
    }
  ]
}

Response

Note Because each device health configuration defines thresholds for multiple health metrics, the output is not shown here. To see sample output, go to Documentation > API Explorer and send the v1/health_configs/Change a health config to see sample results.