View on GitHub

Apica Grafana Plugin

The Apica Grafana Plugin for Grafana v8.0.0+

Download this project as a .zip file Download this project as a tar.gz file

Apica Grafana Plugin

drawing

The Apica Grafana Plugin enables integrating Apica with Grafana to proactively monitor your websites around the clock, along with applications and APIs, to identify availability and performance issues before they impact customers. https://www.apica.io/

Latest Version Number

Supported Grafana Versions

Installation and Configuration Instructions

Step 1: Download and install the plugin

Download and unzip the plugin under your grafana plugins directory

unzip apica-2.0.9.zip -d YOUR_GRAFANA_PLUGIN_DIR/apica

Setup Plugin

Note: Since this is Apica’s private plugin, it must remain “unsigned” per Grafana’s plugin policy. Contact Apica support directly with any questions.

Restart Grafana

Step 2: Add ASM Datasource to Grafana

  1. Copy your Authentication Token from https://wpm.apicasystem.com/Tools/ApiSettings Copy API
  2. Open Grafana Configurations-> Data Source

grafana datasource settings

  1. Add Apica datasource to grafana add apica grafana datasource
  2. Enter the API base URL for your ASM account visible in step 1.

  3. Enter your Authentication Token for the Apica API you copied in step 1

Data Source Instructions

Step 3: Import Grafana Dashboard Templates

Import Dashboards

Dashboards

The apica grafana plugin is shipped with below out of the box dashboards that are available to support visualizing data based on tags, group, check, or account level:

Apica Tags SLA

Dynamic Dashboard to show aggregate SLA by selected tags from the dropdown list.

TAGs SLA

Apica Drill Down Checks Aggregate with Tags

Dynamic Dashboard to show aggregate SLA for selected checks

Apica Check Summary

Dynamic Dashboard to show health status and key KPIs for selected check(s) from the dropdown list


Apica Check Summary Dashboard


Apica Tags Geo Map

View checks health status by geo location for selected Tag


Apica Tags Geo Map Dashboard


Apica Check Summary Status with Tags

View multiple checks summary health status for selected Tag


Apica Tags Geo Map Dashboard


Apica Tags Events Insight

Analyze all events triggered in your Apica system in a selected time for the seleted tag


Apica Tags Events Insight Dashboard


Apica Groups SLA

Dynamic Dashboard to show group Checks SLA


Apica Groups SLA Dashboard


Apica GeoMap Groups

Dynamic Dashboard to show group checks based on geo location

Apica GeoMap Groups Dashboard


Apica Account Events Insight

Analyze all events triggered in your Apica system in a selected time


Apica Account Events Insight Dashboard


Apica Checks Summary Table

View accounts checks summary health status in table format at the account level


Apica Checks Summary Table


Sample Business Dashboard

Sample dashboard to demonstrate business impact by using Apica Synthetic Monitoring


Sample Business Dashboard


Template Variables

The plugin supports template Variables that allows you to create more interactive and dynamic dashboards. Instead of hard-coding things like tag, group, and check in your metric queries, you can use variables in their place. Variables are displayed as dropdown lists at the top of the dashboard. These dropdowns make it easy to change the data being displayed in your dashboard. Variables can be used in titles, descriptions, text panels, and queries. Queries with text that starts with $ are templates

For more information please see the Grafana docs https://grafana.com/docs/grafana/latest/variables/

Name Description Namespace Query
tags List all tags configured on the Apica System tags  
groupByCategory This variable is used to list all tag keys which are used in the group by category list tagsKeys  
scopeOption This variable is used to list scope options which are ) used in the Aggregate Queries. The return values are: (Hour,Day,Week,Month,Year) scopeOptions  
checks This variable is used to list apica checks. The checks can be filtered also based on tags by providing the tags variable name in the query section checks $tags
groups List all groups configured on the Apica System groups  
groupChecks This variable is used to list apica checks for a specified group in the query input groupChecks $groups

Ad hoc filter

Ad hoc filters allow you to add key/value filters that are automatically added to all metric queries that use the specified data source. Unlike other variables, you do not use ad hoc filters in queries. Instead, you use ad hoc filters to write filters for existing queries. https://grafana.com/docs/grafana/latest/variables/variable-types/add-ad-hoc-filters/

The Apica plugin supports ad hoc filter in the tag level queries as a tag filter. For example, if you need to query all aggrgate data from a selected tag where environment = prod. To reference the tag filter ad hoc variable you create in your dashboard, you have to use the $adhoc key work as the value for the “Filter by Tag Expression” field in the Query Editor

The Ad hoc filter supports Grafana operations (=,!=,=~,~!). Note that (=~,~!) allows you to do regex matching

Query Editor Options

The plugin supports multiple options to Query from the Apica system as detailed in this section. Screenshot below shows the list of Query Types. There are common fields in the query editor based on your selection

Query Categories

Aggregate

Filed Name Description Options Additional Info
Timerange Type Allows the user to select the aggreate timerange type (1) Grafana Time Range: gets aggregated data and SLA between two dates.
(2) Most Recent: gets aggregated data and SLA for the most recent periods in a scope. (ie 3 days back if the scope is day)
 
Scope String representation of time aggregation scope [Hour, Day, Week, Month , Year]  
GroupBy Tag Category This option is used if you need to group the aggregate results by a specific key. For example, If you need to Query results by Environment tag value List of Tag Keys Available for Tag Level onlyl
Exclude Checks This Query field option is used by the Group Level Query only to allow the use to exclude check(s) from the returned results. For example, if you need to calculate SLA for a given group but you need to exlcude specific checks in the calculated Group SLA List of Check IDs in the selected Group Available for Group Level only

Check Summary

Metrics

Filed Name Description Options Additional Info
Return Result Type Gives the option to select the type of metrics query to run against the selected check (1) All Metrics: the user can select from a drop down list the metrics that need to be queies
(2) Metrics Summary: This will query the Metrics Summary API that returns multiple metrics that are available for any kind of check like severity, value, result code, message,..etc
 
Metric multi seelction drop down list to select the metric names you need to query and get their results List of metric names only available for All Metrics option

GeoMap

Grafana GeoMap Settings

You need to make sure to define the GeoMap options in order to render the data from this Query in the Grafana Geomap Marker Color: You can define the marker color based on the “Highest Severity” Field Marker Size: You can define the marker size based on the “Impacted Checks Count”

Events

Annotations

The plugin supports annotations by overlaying events like custom events on top of the graphs. When you hover over an annotation you can get the event description.

For example the screenshot below shows a custom event for a deployment that happened on the highlighted time range as annotation

Annotations

The annotation show custom events was configured as below

Annotations Config

How to Build and Configure Dashboards

Example: Dynamic Dashboard with template variables and ad hoc filter

This video will show an example of how to build a dynamic dashboard like the Tags SLA in a step by step

Video: Tags SLA Dashboard

Example: Custom Dashboard

In some scenarios you might need to build a custom dashboard for a specfic checks, tags, or groups. The plugin also supports selecting your data from the Query Editor without relying on template variables. In this video we will build

Video: Custom Dashboard Template