Probes

Probes are active processes that gather information on the state of the system for statistical reporting or error analysis.

Basic Operations

Basic operations of List, Get, Enable, Disable, and Update are available

List Probes

Call to /probe to get all available probes

Request Object

+ URL
  /api/v2/probe

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

Sending this should get you back a valid response, an array with each boot environment in the system.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
    "probes": [
      "fs_usage",
      "network_client",
      "network_interface",
      "pool_iops",
      "pool_usage",
      "status_disk",
      "status_ha",
      "status_pool",
      "status_sensor"
    ]
  }

Get a Probe

Call to /probe/$PROBE_NAME to get information on a specific probe

Request Object

+ URL
  /api/v2/probe/$PROBE_NAME/details

+ Method
  GET

+ Parameters
  probe name (string, required, URL param) - the name of the probe you'd like back

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

Sending this should get you back a valid response, an object describing the probe you requested.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
    "enabled": true,
    "interval": 1,
    "options": {
        "warn_at": 90
    }
  }

Enable a Probe

Enabling a probe allows our statistic gathering service to use it for information gathering.

Request Object

+ URL
  /api/v2/probe/$PROBE_NAME/enable

+ Method
  POST

+ Parameters
  probe name (string, required, URL param) - the name of the probe you'd like to enable

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

Sending this should get you back a valid response, the updated probe object.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
    "enabled": true,
    "interval": 1,
    "options": {
      "warn_at": 90
    }
  }

Disable a Probe

Disabling a probe disallows our statistic gathering service to use it for information gathering.

Request Object

+ URL
  /api/v2/probe/$PROBE_NAME/disable

+ Method
  POST

+ Parameters
  probe name (string, required, URL param) - the name of the probe you'd like to disable

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

Sending this should get you back a valid response, the updated probe object.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
    "enabled": false,
    "interval": 1,
    "options": {
      "warn_at": 90
    }
  }

Update a Probe

Updating a probe sets its information being used in our statistic gathering service.

Request Object

+ URL
  /api/v2/probe/$PROBE_NAME/update

+ Method
  POST

+ Parameters
  probe name (string, required, URL param) - the name of the probe you'd like to enable or disable
  json (JSON, required, Body) - the object to set for the probe in our statistical service

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {
    "json":{
      "enabled": true,
      "interval": 60,
      "options": {
        "warn_at": 80
      }
    }
  }

Response Object

Sending this should get you back a valid response, the updated probe object.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
    "enabled": true,
    "interval": 60,
    "options": {
      "warn_at": 80
    }
  }

Probe Manifest Operations

We have additional requests for retrieving and updating the manifest for your probes. The probe manifest contains a list of all probes and their configurations.

Get the Probe Manifest

Call this route to get a list of all the probes on your system and their configurations.

Request Object

+ URL
  /api/v2/probe/manifest

+ Method
  GET

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {}

Response Object

Sending this should get you back a valid response, the probe manifest.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
    "fs_usage": {
      "enabled": true,
      "interval": 120,
      "options": {
        "warn_at": 90,
        "ignore_rpool": true
      }
    },
    "heartbeat": {
      "enabled": true,
      "interval": 10
    },
    "network_client": {
      "enabled": true,
      "interval": 5
    },
    "network_interface": {
      "enabled": true,
      "interval": 5
    },
    "pool_iops": {
      "enabled": true,
      "interval": 5,
      "options": {
        "pool_rescan": 300000
      }
    },
    "pool_usage": {
      "enabled": true,
      "interval": 300,
      "options": {
        "warn_at": 90
      }
    },
    "status_disk": {
      "enabled": true,
      "interval": 300
    },
    "status_ha": {
      "options": {
        "comment": "this probe is not enabled by default. the HA wizard in the UI will enable it"
      },
      "enabled": false,
      "interval": 10
    },
    "status_pool": {
      "enabled": true,
      "interval": 10
    },
    "status_sensor": {
      "enabled": true,
      "interval": 60,
      "options": {
        "warn_at": 85,
        "critical_at": 90
      }
    }
  }

Set the Probe Manifest

Call this route to update the configuration of the probes on your system. This is a dangerous operation compared to the individual update route and should only be used if there are many probes to change.

Request Object

+ URL
  /api/v2/probe/manifest

+ Method
  POST

+ Parameters
  manifest (object, required, Body) - the full manifest for probe configurations.

+ Headers
  Content-Type: application/json
  token: ThisIsNotARealTokenGenerateYourOwnToken

+ Body
  {
    "manifest" : {
        "fs_usage": {
            "enabled": true,
            "interval": 180,
            "options": {
                "warn_at": 90,
                "ignore_rpool": true
            }
        },
        "heartbeat": {
            "enabled": true,
            "interval": 10
        },
        "network_client": {
            "enabled": true,
            "interval": 5
        },
        "network_interface": {
            "enabled": true,
            "interval": 5
        },
        "pool_iops": {
            "enabled": true,
            "interval": 5,
            "options": {
                "pool_rescan": 300000
            }
        },
        "pool_usage": {
            "enabled": true,
            "interval": 300,
            "options": {
                "warn_at": 90
            }
        },
        "status_disk": {
            "enabled": true,
            "interval": 300
        },
        "status_enclosure": {
            "enabled": true,
            "interval": 30
        },
        "status_ha": {
            "enabled": false,
            "interval": 10,
            "options": {
                "comment": "this probe is not enabled by default. the HA wizard in the UI will enable it"
            }
        },
        "status_interface": {
            "enabled": true,
            "interval": 30,
            "options": {
                "interface_names": []
            }
        },
        "status_pool": {
            "enabled": true,
            "interval": 10
        },
        "status_sensor": {
            "enabled": true,
            "interval": 60,
            "options": {
                "warn_at": 85,
                "critical_at": 90
            }
        },
        "status_power": {
            "enabled": true,
            "interval": 30,
            "options": {
                "ok_state": "presence detected"
            }
        }
    }
  }

Response Object

Sending this should get you back a valid response, the updated probe manifest.

+ Headers
  X-Powered-By: OpenDrives
  Access-Control-Allow-Origin: *
  Content-Type: application/json; charset=utf-8

+ Body
  {
    "fs_usage": {
        "enabled": true,
        "interval": 180,
        "options": {
            "warn_at": 90,
            "ignore_rpool": true
        }
    },
    "heartbeat": {
        "enabled": true,
        "interval": 10
    },
    "network_client": {
        "enabled": true,
        "interval": 5
    },
    "network_interface": {
        "enabled": true,
        "interval": 5
    },
    "pool_iops": {
        "enabled": true,
        "interval": 5,
        "options": {
            "pool_rescan": 300000
        }
    },
    "pool_usage": {
        "enabled": true,
        "interval": 300,
        "options": {
            "warn_at": 90
        }
    },
    "status_disk": {
        "enabled": true,
        "interval": 300
    },
    "status_enclosure": {
        "enabled": true,
        "interval": 30
    },
    "status_ha": {
        "enabled": false,
        "interval": 10,
        "options": {
            "comment": "this probe is not enabled by default. the HA wizard in the UI will enable it"
        }
    },
    "status_interface": {
        "enabled": true,
        "interval": 30,
        "options": {
            "interface_names": []
        }
    },
    "status_pool": {
        "enabled": true,
        "interval": 10
    },
    "status_sensor": {
        "enabled": true,
        "interval": 60,
        "options": {
            "warn_at": 85,
            "critical_at": 90
        }
    },
    "status_power": {
        "enabled": true,
        "interval": 30,
        "options": {
            "ok_state": "presence detected"
        }
    }
  }