Integrate > Create custom integrations > Example: Sending JSON Data to BVD

Example: Sending JSON Data to BVD

Sending Data From Data Center East

In this example, Data Center East sends two sets of JSON data to the BVD receiver. In both sets, the data fields host and metricName uniquely identify the value. The fields are therefore selected as dimensions (dims) and included in the URL. Once received by the BVD server, the JSON data creates two data channels:
dimHost A dimCPU load and dimHost B dimDisk util.

Lessons learned

Lessons learned: Pick the fields in your data that uniquely identify the values you want to send to BVD and include the fields as dimensions in the HTTP post request.

Note If you send data to BVD from an application that is not part of the suite container deployment (for example a classically installed OMi), define the receiver URL as follows:

https://<external_access_host>/bvd-receiver/api/submit/<API key>

If you send data to BVD from an application that is also installed as a suite container, define the receiver URL as follows:

http://bvd-receiver.<namespace>.svc.cluster.local:4000/bvd-receiver/api/submit/<API_key>

<namespace> is the namespace assigned to your suite deployment. You can check the namespace by accessing SUITE > Management in the Management Portal.

Sending Additional Data From Data Center East

The primary location of Data Center East is in New York City, with backup servers located in Boston. Both locations send the same set of JSON data. To differentiate the data from the two locations without modifying the JSON data, you can add an additional dimension loc with the corresponding value to the URL. The modified URL updates the data channels to
dimHost A dimCPU load dimNYC and dimHost B dimDisk util dimBoston.

In this example, we added the dimension loc to the URL.

Lessons learned

Lessons learned: Directly assign values to your dimensions by adding dim=value pairs to the HTTP post request.

Sending Data From Data Center West

A second data center, Data Center West, starts sending data similar to the JSON data sent by Data Center East. The data from Data Center West uses the same data channels as the data from East. To distinguish the data from the two centers, you must add the origin to the data. You can do this by adding tags to the URL. Tags are static labels that you can attach to your data to create more specific data channels.

In this example, we added the tags east and west to the URL. The tags precede the dims in the data channels.

Lessons learned

Lessons learned: Attach tags to your data to create specific data channels.

Associating Data Channels with Widgets

Associating data channels with widgets

Once BVD has received the data, it creates the corresponding data channels. You can then associate a data channel with your widget in the widget's properties. In this example, the data channel tageastdimHost AdimCPU loaddimNYC has been selected for the sparkline widget.

By default, the widget consumes data from the value data field. In this example, the current value is 42. If the field that holds the values you are interested in has a different name (for example, metricVal), select that name in the Data Field property of the widget.

Lessons learned

Lessons learned: Connect your data to a widget by selecting the corresponding data channel in the widget's properties.