Plugins 〉OSIsoft-PI

Grid Protection Alliance

Sign up to receive occasional product news and updates:

Data Source


  • Overview
  • Installation
  • Change log
  • Related content

PI Web API Datasource for Grafana

This data source provides access to OSIsoft PI and PI-AF data through PI Web API.



Datasource Configuration

Create a new instance of the data source from the Grafana Data Sources administration page.

It is recommended to use "proxy" access settings. You may need to add "Basic" authentication to your PIWebAPI server configuration and add credentials to the data source settings.

NOTE: If you are using PI-Coresight, it is recommended to create a new instance of PI Web API for use with this plugin.

See PI Web API Documentation for more information on configuring PI Web API.

Querying via the PI Asset Framework


  1. Verify that the PI Point Search toggle is greyed off
  2. In Element click Select AF Database and choose desired database in list
    • A new ui segment should appear: Select AF Element
    • A known bug currently exists where this new ui segment fails. In this case select the + in Attributes and it will force create the ui segment
  3. Click Select AF Element and select the desired AF element
  4. Repeat step 3 until the desired element is reached
  5. Under Attributes click the + icon to list attributes found in selected element; select attribute from dropdown
    • If list of attributes does not appear begin typing attribute name and attributes should appear
    • This method can also be used to filter through long lists of attributes
  6. Repeat step 5 as many times as desired

Querying via the PI Dataserver (PI Points)


  1. Toggle the Pi Point Search on
  2. Under Data Server click Select Dataserver and select desired PI Dataserver
  3. Under PI Points click the + icon to open a text entry field
  4. Type the exact name of the desired PI Point; it is NOT case sensitive (sinusoid === SINUSOID === sInUsOiD)
  5. Repeat steps 3 - 4 for as many PI Points as desired

Template Variables

Child elements are the only supported template variables. Currently, the query interface requires a json query.

An example config is shown below.
{"path": "PISERVER\\DatabaseName\\ElementNameWithChildren"}


Event Frames and Annotations

This datasource can use AF Event Frames as annotations.


Creating an annotation query and use the Event Frame category as the query string. Color and regex replacement strings for the name are supported.

For example:


Install using the grafana-cli or clone the repository directly into your Grafana plugin directory.

grafana-cli plugins install gridprotectionalliance-osisoftpi-datasource


All product names, logos, and brands are property of their respective owners. All company, product and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement.

OSIsoft, the OSIsoft logo and logotype, and PI Web API are all trademarks of AVEVA Group plc.

Installing OSIsoft-PI on Grafana Cloud:

For more information, visit the docs on plugin installation.



  • Initial release.


  • Move to React based framework.


  • Added calculation to PI Points
  • Added PI point configuration (thanks to @TheFern2)
  • Added option to use last value from PiWebAPI
  • Updated to Grafana plugin SDK v9.3.6


  • Added a new dataframe label format. It can be disabled in the configuration page for backward compatibility
  • Added engineering units to Dataframe field. This can be globaly disabled in the configuration page
  • Optimized queries using PIWebAPI batch endpoint
  • Improved raw query processing
  • Added variable support in raw query
  • Fixed annotations support
  • Updated to Grafana plugin SDK v9.4.7
  • Fixed PI AF calculation
  • Added plugin screenshots


  • Modified the PI Webapi controller endpoints used when calculation is selected
  • Allow calculation when last value option is selected
  • When calculation is selected, change label from Interpolated to Interval
  • Fixed issue with variable in Element Path


  • Fixed issue that only odd attributes were been shown
  • Fixed issue when fetching afServerWebId