Telemetry & Webhook

Automation & DevOps • Telemetry • Webhook

Telemetry & Webhook

Examples for configuring WTI telemetry services to stream JSON datasets or push event-based payloads to common endpoints such as Splunk, WebEx, Slack, Syslog, and custom collectors.

Splunk dashboards & inputs (Download)
Use the Splunk app to visualize streamed WTI telemetry data (power/current/temperature) and related logs (syslog/audit/alarm). Note: Splunkbase may require you to log in to download.
On this page

WTI Continuous Streaming Telemetry Service (Splunk EndPoint)

WTI devices can stream continuous JSON power, current, or temperature data to a collection point in your organization. When data is ready to be sent, it can be posted to a common collection endpoint and analyzed later in Splunk.

Prerequisites
WTI device steps
  1. Log in to the WTI device.
  2. At the CLI, enter: /tel
  3. Select: 1. Continuous (Streaming Data)
  4. Choose a slot and configure it to match your Splunk HEC setup.

Sample /tel configuration (Streaming)

Field What to enter
Enable On (starts sending telemetry)
Name Any descriptive service name
User Name Splunk account name using the HTTP Event Collector
Password Splunk HEC Token value
Shared Secret Not used for this endpoint type
Dataset Power (other streaming datasets include Current and Temperature)
Frequency In seconds, how often to send the dataset (example: 600)
Timeout How long to wait before retrying
Retries How many times to retry before signaling failure
Command Splunk collector URL (example: https://splunk.yourcompany.com:8088/services/collector)
Result: After saving the parameters and returning to the main menu, you should start seeing data populate in Splunk. The same procedure can be used for Current and Temperature datasets.

Example: Raw JSON output (Power dataset)

NOTE
{ “sourcetype”: “powerdata”, “event”: { “timestamp”: “2020-06-18T17:40:08+00:00”, “siteid”: “CPM-1600-1-ECAM-LAB”, “location”: “LABRACK1”, “powerunit”: “1”, “outletmetering”: “1”, “ats”: “1”, “branchcount”: “2”, “plugcount”: “4”, “powerfactor”: “100”, “powereff”: “100”, “powerdatacount”: “1”, “powerdata”: [{ “timestamp”: “2020-06-18T17:40:08+00:00”, “plug1”: [{ “plugname”: “HP1”, “voltage”: “113.00”, “current”: “0.50”, “branch”: “1” }], “plug2”: [{ “plugname”: “HP_2100”, “voltage”: “113.00”, “current”: “0.20”, “branch”: “1” }], “plug3”: [{ “plugname”: “Meraki”, “voltage”: “113.00”, “current”: “0.00”, “branch”: “1” }], “plug4”: [{ “plugname”: “CiscoNXOS1”, “voltage”: “113.00”, “current”: “1.20”, “branch”: “1” }], “plug5”: [{ “plugname”: “CiscoNXOS2”, “voltage”: “114.00”, “current”: “0.00”, “branch”: “2” }], “plug6”: [{ “plugname”: “Juniper3000”, “voltage”: “114.00”, “current”: “0.00”, “branch”: “2” }], “plug7”: [{ “plugname”: “”, “voltage”: “114.00”, “current”: “0.00”, “branch”: “2” }], “plug8”: [{ “plugname”: “”, “voltage”: “114.00”, “current”: “0.00”, “branch”: “2” }] }] } } }
      

WTI Event-Based Telemetry (Webhook / Custom EndPoint)

What is a WebHook?

A WebHook (also called a web callback or HTTP push API) delivers data to other applications in real time as events occur. WebHooks are a free-form interaction type for WTI devices, allowing JSON-formatted data to be posted to an endpoint of your choosing (for example: Splunk, Elasticsearch, Syslog, WebEx, Slack, or a custom collector).

Example: Send Alert data to a custom endpoint (my.wti.com)
  1. Set up your custom endpoint (example: my.wti.com).
  2. Log in to my.wti.com and click Download.
  3. Under API Key, click Make APIkey and save the key for later.
  4. Log in to the WTI device and enter /tel.
  5. Select 2. Event Based (One Shot Data), choose an empty slot, then configure it as required.
Sample (Event Based) configuration
EVENT BASED TELEMETRY DETAILS: [my.wti.com] IPv4/IPv6
  1. Enable: On
  2. Name: my.wti.com
  3. User Name: (undefined)
  4. Password: (undefined)
  5. Shared Secret: (undefined)
  6. Dataset: Alert Data
  7. Timeout: 10
  8. Retries: 2
  9. Command: https://my.wti.com/testing/webhook.aspx?apikey=YOUR_API_KEY
  10. Display Status
  11. Display Debug Info
          
Example payload (Alert Data)
{ “sourcetype”: “wtiaudit”, “event”: { “timestamp”: “2020-07-28T16:47:30+00:00”, “location”: “LABRACK1”, “siteid”: “CPM-1600-1-ECAM-LAB”, “assettag”: “1234567890”, “package”: [{ “timestamp”: “2020-07-28T16:47:30+00:00”, “type”: “audit”, “trigger”: “LOGIN Network”, “additional”: ” SSH Port 22″, “message”: “LOGIN Network SSH Port 22 super1” }] } }
          

Customize your output format (Custom Post String)

If your endpoint requires a specific JSON format, set Dataset: Custom and define a Custom Post String. Variables wrapped with % are replaced with active device data at post time.

Example Custom Post String
{‘text’:’HelloWorld %date%, lo=%location% si=%siteid%, at=%assettag%, t=%type%, l=%level%, t=%trigger%, u=%user% m=%message% a=%additional% office’}
        
Replaceable variables
Variable Meaning
%date% UTC/GMT time/date of the WTI device
%location% Contents of the Location field
%siteid% Contents of the Site ID
%assettag% Contents of the Asset Tag
%type% Alert type (e.g., audit or alarm)
%level% Alert level (if defined)
%trigger% What triggered the data being sent
%user% Username (if applicable)
%message% Triggered alert message
%additional% Miscellaneous additional information

WTI Event-Based Telemetry (WebEx EndPoint)

WTI devices can send event-based JSON data to WebEx using a bot. When an event triggers on the device, the payload can be posted to the WebEx API.

WebEx prerequisites
WTI device steps
  1. Log in to the WTI device and enter /tel.
  2. Select 2. Event Based (One Shot Data).
  3. Choose a slot and set Command to https://api.ciscospark.com/v1/messages.
  4. Use the WebEx Access Token as the Password field and define a Custom Post String that matches WebEx requirements.
Sample configuration (WebEx)
EVENT BASED TELEMETRY DETAILS: [testwebex] IPv4/IPv6
  1. Enable: On
  2. Name: testwebex
  3. User Name: (undefined)
  4. Password: WEBEX_ACCESS_TOKEN
  5. Shared Secret: (undefined)
  6. Dataset: Custom
  7. Timeout: 10
  8. Retries: 2
  9. Command: https://api.ciscospark.com/v1/messages
  10. Custom Post String:
      { “text”: “WTI event %date%, loc=%location% site=%siteid%, at=%assettag%, t=%type%, l=%level%, t=%trigger%, u=%user% m=%message% a=%additional%”, “toPersonEmail”: “mytest@wti.com”}
  11. Display Status
  12. Display Debug Info
        
Tip: WebEx requires a text field in the JSON message. Since endpoint requirements vary, WTI supports a fully customizable JSON block with replaceable variables to fit your client.