This code example is explained in the Bright Talk webinar
OpsRamp has a very extensible API which, when used properly, has the capability to extend the monitoring and
alerting capabilities of the OpsRamp platform to just about any subsystem within an organization. This repo
is an example of how to leverage this open API and post data from any source. Our example revolves around
the IoT use case but certainly should not be limited to this use case. Any IP based resource or gateway
to a resource should be able to leverage this example. This code was written and proved out using an MQTT
client running on a Raspberry Pi 3+ subscribed to events on a MQTT broker running Eclipse Mosquitto.
- OpsRamp_Post_Metric.py
Executable example file with a data generator to prove out the configuration and communication between the
source environment and the OpsRamp platform. - OpsRampTenantCredentials.json
A JSON file containing the oAuth2 credentials (you must edit) generated by the OpsRamp platform in the
“Setup~Integrations~Integrations” area. You must create a custom or Webhook integration to generate these credentials.
A JSON file containing the Resource GUID from the OpsRamp platform found in the “Infrastructure~(selected
resource)~Attributes” tab - MQTTtoOpsRamp.py
This is also an executable example of how to read from an MQTT bus and post the metric to OpsRamp. This uses
the PAHO MQTT client
This code is provided as an example. It has not been proven for scalability nor for security. You can use this
code at your own risk.