Grafana alert feature is not working and throwing the error message “The data source does not support alerting queries”.
We are using openHistorian 2.6.30.x and Grafana 6.2.5. We can perform all graph related tasks, but alert configuration for a Graph is not working and when testing the rule, we got below error message.
Object
firing:true
state:“pending”
conditionEvals:" = true"
timeMs:“0.000ms”
error:“tsdb.HandleRequest() error Could not find executor for data source type: gridprotectionalliance-openhistorian-datasource”
Please provide more details and what needs to be done.
Also, I tried to reinstall the data source plugin using Grafana-cli and restarted openHistorian service as well as Grafana.
Unfortunately the Grafana openHistorian Datasource does not support Grafana Alerts.
The DataSource does support annotations and it is possible to show alarms set up in the openHistorian as annotations in Grafana.
Because the openHistorian has its own alarm engine there is currently no need for integration with the Grafana Alert Engine.
In newer versions of the OpenHistorian (2.8.X) there is limited support for displaying openHistorian alarms on the Graph Panel similarly to Grafana Alerts. However this only displays alerts set up in the openHistorian and still ignores any alerts set up in the Grafana Alert Engine.
HI Clackner,
Thanks for your quick response and understood the issue.
We would like to setup the alarm using openHistorian Manager and send notification to designated people using email or telegram.
Is there any provision available in openHistoran?
Or
Do we have any other tools/option to handle this kind of requirements?
Also I checked openHistorian database, looks like there is no option to record the alarm status, can you please clarify, where alarm status is currently maintained in openHistorian.
I could not able to find any specific configuration parameters for Alarm email notification or email notification/DynamicCalculator.EmailNotifier in openHistorian.config file. Could you please explain the steps to configure the email notification for Alarm status?
Also, if you have any document related to that, please share.
This is an adapter that is configured with a connection string, there are no config file parameters for this feature.
Open the openHistorian UI Manager (not the web interface) and navigate to Actions > Manage Custom Actions then go to the last page of actions, i.e., click the >> button on the bottom right of the page. Now click Add New button and select E-Mail Notifier from the Type list.
This will create an e-mail based on a custom boolean expression, for example:
VariableList={x = PPA:1; y = PPA:2};
ExpressionText=x+y > 0
You will also need to set all the e-mail parameters…
Thanks for your clarification and able to configure the email alert message successfully.
I have some additional queries, please clarify
How to use actual variable in email body?
VariableList= {x = PPA:20274};
I need to use variable X in email body
How to add current time as part of email body?
If I need to send message for each measurement independently, what is the procedure?
E.g.
PPA:20274
PPA:20275
If PPA: 20274 > 0 then I need to send email to different set of receipts (like A, B and C)
If PPA: 20275 > 20 then I need to send email to different set of receipts (like P, Q and R)
Can we use single email notification configuration, or do I need to setup independent alarm for each measurement and set separate email notifier?
Are you sure you are alarming off of the alarm measurement? You’ll need to give me some more context, like alarming parameters, frequency of alarm input, e-mail adapter connection string, etc.
You need to use both the alarm value (for the trigger - set to ‘x’) and the include the frequency value (for the e-mail - set to ‘y’). You then need to set the e-mail condition trigger to only evaluate when the alarm is triggered, i.e., ExpressionText=x > 0.
You will need to process values continuously to pull this off, so frame rate will need to match frequency rate, e.g., 30, and you will need to set UseLatestVaues to false so that measurements are processed at their native rate.
Also, since the alarm value will arrive rarely and the frequency value will arrive consistently, the alarm value will be substituted with a sentinel value which defaults to NaN. We set sentinel value to -1 instead to produce a cleaner negative answer to the expression condition of x > 0 which will be evaluated with each received frequency. See updates to connection string below:
Email Notifier connection string
From=abc@Test.com.au; SmtpServer=Test; Subject=OpenHistorian Alarm;
Body={The frequency value (y) is {y:N3}.}; ToRecipients=abc@Test.com.au;
VariableList={x = AL-HIGH:ABCX!TP!ABC:FREQ; y = PPA:20274};
ExpressionText=x > 0; FramesPerSecond=30; LeadTime=5.0; LagTime=5.0;
UseLatestValues=false; SentinelValue=-1.0
I’m using below connection string for email notifier,
From=abc@Test.com.au; SmtpServer=Test; Subject=OpenHistorian Alarm; Body={The value of x is: {x}.}; ToRecipients=abc@Test.com.au; VariableList={x = AL-HIGH:NOJA_AZURE!EQL!NP!ECROWE:FREQ; y = PPA:20274}; ExpressionText=x > 0; FramesPerSecond=30; LagTime=5; UseLatestValues=False; SentinelValue=-1.0
But I’m getting below error while specifying the alarm tag as part of expression. I’m using openHistorian 2.6.x. Is there any limitation?
[6/19/2020 11:56:28 AM] [Action Adapter Collection] Failed to initialize adapter ALERT_EMAIL_NOTIFIER: The value is not in the correct format for a MeasurementKey value
[6/19/2020 11:56:28 AM] (Inner Exception)
Date and Time: 6/19/2020 11:56:28 AM
Machine Name: NOJA-180
Machine IP: fe80::341b:7fcc:e46d:cc2c%12
Machine OS: Microsoft Windows NT 6.2.9200.0
Exception Source: GSF.TimeSeries
Exception Type: System.FormatException
Exception Message: The value is not in the correct format for a MeasurementKey value
Exception Target Site: Parse
---- Stack Trace ----
GSF.TimeSeries.MeasurementKey.Parse(value As String)
openHistorian.exe: N 00094
DynamicCalculator.DynamicCalculator.GetKey(token As String)
openHistorian.exe: N 00048
DynamicCalculator.DynamicCalculator.AddAliasedVariable(token As String)
openHistorian.exe: N 00108
DynamicCalculator.DynamicCalculator.set_VariableList(value As String)
openHistorian.exe: N 00280
DynamicCalculator.DynamicCalculator.Initialize()
openHistorian.exe: N 00151
DynamicCalculator.EmailNotifier.Initialize()
openHistorian.exe: N 00378
GSF.TimeSeries.Adapters.AdapterCollectionBase`1.Initialize(item As T)
openHistorian.exe: N 00359
You can’t use the point tag for variables. You’ll need to use the measurement key of that alarm measurement. You can find it on the Manage Measurements page in the ID column. It has the format STAT:###.
No, the problem is x = AL-HIGH:ABCX!TP!ABC:FREQ. You need to go to the Manage Measurements page, search for that measurement, record what’s in the ID column, and then use that in your variable list instead.