Note: This post was co-authored by Sean Whitney |
Key Takeaways
|
|
AppNeta comes pre-loaded with a number of powerful dashboards and reports so you can quickly and easily understand your network performance.
But what if your team uses Grafana to visualize its network operation monitoring data?
Simple—just set up a connection between AppNeta’s API and Grafana. You’ll be able to visualize all your networking data in one place.
This article is a step-by-step guide to set up a connection between AppNeta and Grafana using AppNeta’s API. Here are the topics covered:
To set up this integration, you’ll need to start with the following:
The AppNeta API makes data collected and generated by AppNeta available for analysis, reporting, and presentation in third-party systems. Data is delivered in a lightweight JSON format that can be readily consumed by a broad range of third-party applications—including Grafana.
To use the API with Grafana, start by creating an API access token using the steps below.
Tip: Prefer to access these steps in a video? Watch our step-by-step tutorial for a visual guide. |
With the token you have produced, you can give Grafana the authorization it needs to pull monitoring data from AppNeta.
Next, you need to download the Infinity plugin on Grafana—we’re going to pull AppNeta monitoring data into it.
There are two ways to install the plugin—either with the user interface or with the command line interface.
To install the Infinity Plugin from the Grafana user interface:
1. Log into Grafana and navigate to Administration > Plugins.
2. Click Connections and search for the Infinity plugin.
3. Select Infinity and click Install.
To install the Infinity plugin through the command line, use the following commands:
grafana-cli plugins install yesoreyeram-infinity-datasource
systemctl restart grafana-server
The next step is to configure the data source, connecting the AppNeta API to the Infinity plugin within Grafana:
1. In Grafana, navigate to Administration > Data sources from the dropdown menu.
2. Click Add new data source.
3. In the search bar, enter Infinity
and select the Infinity plugin.
4. In the Name field, enter a meaningful name for the data source. Then, navigate to Authentication and select Setup Authentication.
Tip: We recommend naming the data source with either the URL for the specific AppNeta application node or a friendly name such as AppNeta . Your AppNeta node is the first part of the URL you access when logged into AppNeta. (For example, if the URL you use to access AppNeta is app-21.pm.appneta.com , the node is app-21 .) See AppNeta Service Details for instructions to find your application node. |
5. Select API Key Value Pair, then enter Authorization
in the Key field and Token <API token>
in the Value field, where <API token>
is an AppNeta API access token string that you generated earlier. Token values are case sensitive.
6. In the Allowed hosts field, enter the AppNeta API URL in the format https://<application-node>.appneta.com/api/v3/
, where <application-node>
is the application node for your AppNeta instance. Again, see AppNeta Service Details for instructions to find your application node.
Note: Your entry in the Allowed hosts field may appear purple, as in the image above, or red, as seen below: |
7. Navigate to Headers & URL params and create a new custom HTTP header, entering Accept
in the Key field and application/json
in the Value field.
8. Click Save & test. If there are no errors, you will see this message: OK. Settings saved.
Tip: In this section, we set the AppNeta API as a data source. You can also configure Grafana to access your database directly by specifying the database target and providing authentication credentials. For more information, see Grafana documentation on connecting data sources. |
You’ve set up the Infinity Plugin in Grafana to pull data from AppNeta. Next, we’ll set up a dashboard in Grafana to visualize that data:
1. From the main menu in Grafana, click the + symbol, and select Dashboard.
2. Choose Add a new panel.
3. Configure your specific data source for the Infinity plugin.
AppNeta <application-node>
, you will see that name in the list. In the screenshot example, we named our data source demo.pm.appneta.com
. https://<application-node>.pm.appneta.com/api/v3/path/data
, where <application-node>
is the application node for your AppNeta instance.https://<application-node>.pm.appneta.com/api/v3/path/<id>/data
, where <application-node>
is the application node for your AppNeta instance and <id>
is the path ID of the path you would like to retrieve data for. 4. Identify the correct Rows/Root values and Column values for the query. These values specify which rows and columns of data from AppNeta you want to visualize in Grafana. We explain how to do this and provide examples in the next section.
$.<first-level>.<second-level>
, where $
. signals a row variable, <first-level>
is the first level of the JSON formatted data you want to include, and <second-level>
is the second level. For example, use $.data.latency
to visualize latency metrics. See the next section for more examples.start
in the Selector field, Latency
in the as field, and Number
in the format as field.5. Optionally, add paths or metrics by creating an additional query.
6. The data is now shown in a chart in Grafana. Now you can customize the chart further by adding a title, changing design elements, and more.
Grafana asks you to enter in Rows/Root and Column values when you are setting up your query. To do that properly, you need to be able to find the Rows/Root and Column values from the AppNeta API output. This section explains how to find the correct Rows/Root and Column values in AppNeta, and provides some examples you can use.
To find the values for a path and metric:
1. In AppNeta, navigate to the gear icon
2. Navigate to the desired endpoint and click Try it out.
3. If you choose to retrieve data for a specific path, enter its path ID number in the id field.
4. Select the metric of interest from the metric list and click Execute.
5. Use the API response to identify the Rows/Root values in Grafana. The output will contain the names of the variables for Grafana. Path data are nested variables within the path attributes.
$.<first-level>.<second-level>
, where <first-level>
is the first level of the JSON formatted data you want to include, and <second-level>
is the second level.latency
is nested under data
. You would therefore input $.data.Latency
to Grafana to include latency in your visualization.6. Use the API response to identify the Column values in Grafana.
start
in the Selector field. Then enter a label, such as Time
, and select a data type, such as Time (UNIX ms)
.value
in the Selector field. Then enter a label, such as Latency
and select a data type, such as Number
.Keep in mind that some AppNeta metrics are collected in both monitoring directions—from the source Monitoring Point to the target, and from the target Monitoring Point to the source. These metrics are recorded as separate values:
These must be called individually to collect those metrics for visualization. For example, data loss is a metric collected in both monitoring directions. To visualize both outbound and inbound data loss in Grafana, you would have to include both in your dashboard:
$.dataOutbound.dataLoss
$.dataInbound.dataLoss
To plot inbound voice jitter over time, we recommend using the following values.
$.dataInbound.voiceJitter
start
Time
Time (UNIX ms)
value
Voice Jitter
Number
To plot outbound voice jitter over time, we recommend using the following values.
$.dataOutbound.voiceJitter
start
Time
Time (UNIX ms)
value
Voice Jitter
Number
The Infinity plugin may not be the most efficient way to visualize AppNeta data in Grafana because it uses individual API queries for each data set. Instead, you may be able to use a UQL/JSONata enhancement that limits the number of API queries and visualizes your data more efficiently.
Cloud Observability’s Unified Query Language (UQL) is a language designed to query data from various sources in a universal manner. It is a powerful way to process metric data. JSONata is a lightweight query and transformation language designed specifically for querying and transforming JSON data. It provides a powerful and expressive toolset for navigating and manipulating JSON structures.
The Grafana Infinity plugin allows you to use either language to transform data. The way data is presented in the /v3/path/{id}/data feed is to separate each data type into its array of key-value pairs. Each pair has a timestamp with millisecond precision. This same timestamp seems to be present for all the different data types. Using these keys, it may be possible to correlate all the data points in the feed to a single table, allowing the presentation of all relevant data with one query.
Part of the wider NetOps by Broadcom solution, AppNeta provides teams with the complete visibility they need to track network performance from end to end, no matter which networks user connections rely upon.
Use AppNeta’s powerful monitoring capability with Grafana to build real-time dashboards, so you can quickly see and understand performance issues on your network.
Follow these links to learn more about AppNeta’s features or request a demo. If you already have AppNeta, check out our training resources to learn more about using it and setting up integrations.