Trending
Trending with the Factry Histo...
Trending Measurements
prerequisites before using measurements to build a trend in grafana, ensure measurements are available in factry historian configuring the factry historian datasource plugin for grafana docid\ q9t7hxoxsknylawporfdd is correctly set up default usage to trend measurements, either create a new dashboard or use the explore functionality next, select the factry historian datasource plugin as the data source if it's not selected by default, then select the measurements tab select a database from the dropdown menu by default, all historian databases will be queried for a measurement name begin typing for text suggestions multiple database can be selected select a measurement from the dropdown menu begin typing for text suggestions both measurement names and descriptions will be searched multiple measurements can be selected tick the "use regular expressions box" to use query with regular expressions docid\ ofg2npmyrn4zkznsonpe7 select an aggregation function and aggregation window the defaults are mean and $ interval the $ interval variable is available in grafana, and will adjust the aggregation window depending on the selected time range in the panel/dashboard optionally, select a fill type for aggegration windows where not data is present by ticking the "include last known point" box, the last value in factry historian for the selected measurement(s) outside the selected time range will be displayed optionally adapt the grouping by statement by default, data will be grouped by status optionally filter on datatypes optionally filter on tags for more information, consult tags & labels docid\ zb70hnsdfnj3sj42myjxi information optionally filter on values (e g only return values >= 0) optionally limit the max amount of returned values the factry historian datasource plugin will then fetch the data from factry historian and include all configured creating a measurement docid\ u5 07ylms2jix9kz m lb units of measurement for labeling the y axes scaling the trend's y axis with the valuemin and valuemax settings providing the hi and lo boundaries for threshold colors example in this example, the measurement simulator/line 1/bt1p/energyusage in factry historian is configured as follows uom kwh valuemin 0 valuemax 2000 limitlo 0 limithi 1000 in grafana, it will show up as using regular expressions consult query with regular expressions docid\ ofg2npmyrn4zkznsonpe7 using grafana variables to populate dropdown lists use dropdown lists in factry datasource to allow viewers to pick which database or measurement they want to see filter with database name use the database dropdown in factry datasource so measurement list updates when the user selects a different database multi select is supported users can fetch data from more than one database at the same time filter with measurement name similar to filtering by database name, use measurement dropdown to select a measurement supports multi select so users can trend multiple measurements together can be combined with database selection for extra filtering use these variables in your panel troubleshooting incorrect aggregation for datatype if you select multiple measurements and choose an aggregation that is not suitable for all of the selected measurement data types, the factry datasource will automatically switch the aggregation to last this is a safety measure to ensure that data is still displayed, even if the originally selected aggregation is incompatible with one or more of the measurements example you select both a numeric measurement (temperature) and a string typed measurement (status code) or boolean typed measurement (state) you choose the mean aggregation since mean cannot be applied to string and boolean data, the datasource automatically changes the aggregation for all measurements to last if you want different aggregations for different data types , you need to add multiple queries in your grafana panel one query for numeric measurements with applicable aggregations ( mean , max , min , etc ) another query for string or boolean measurements with applicable aggregations ( last , first , mode , etc ) this way, each data type gets the right aggregation, and you avoid issues with displaying trend of your data