* create telemetry metric report definition
@ 2021-06-28 21:14 Mohammed.Habeeb ISV
2021-06-30 9:24 ` Grobelny, Krzysztof
0 siblings, 1 reply; 2+ messages in thread
From: Mohammed.Habeeb ISV @ 2021-06-28 21:14 UTC (permalink / raw)
To: openbmc
Hi
How to create a telemetry metric report definition? I tried to set via dbus command as below, but got an error.
busctl call xyz.openbmc_project.Telemetry /xyz/openbmc_project/Telemetry/Reports xyz.openbmc_project.Telemetry.ReportManager AddReport MyMetric Periodic 1 1 1000 "/xyz/openbmc_project/sensors/current/HSC_IOUT" "SINGLE" 1 "/redfish/v1/Chassis/Transformers_MotherBoard/Sensors/HSC_IOUT/Reading"
Unknown signature type M.
Tried to use redfish also, but got an internal service error. Please let me know if I miss anything here in both commands.
habeeb@nsit-160:~/openbmc_nibu06$ curl -k -H "X-Auth-Token: $token" -X POST https://${bmc}/redfish/v1/TelemetryService/MetricReportDefinitions -d '{
"Id":"MyMetric",
"Metrics":[
{
"MetricId": "HSC_IOUT_reading",
"MetricProperties":
["/redfish/v1/Chassis/Transformers_MotherBoard/Sensors/HSC_IOUT/Reading"]
}
],
"MetricReportDefinitionType": "Periodic",
"ReportActions": ["RedfishEvent", "LogToMetricReportsCollection"],
"Schedule": {
"RecurrenceInterval": "PT1S"
}
}'
{
"error": {
"@Message.ExtendedInfo": [
{
"@odata.type": "#Message.v1_1_1.Message",
"Message": "The request failed due to an internal service error. The service is still operational.",
"MessageArgs": [],
"MessageId": "Base.1.8.1.InternalError",
"MessageSeverity": "Critical",
"Resolution": "Resubmit the request. If the problem persists, consider resetting the service."
}
],
"code": "Base.1.8.1.InternalError",
"message": "The request failed due to an internal service error. The service is still operational."
}
}
---
I see xyz.openbmc_project.Telemetry.ReportManager Interface is present.
sysadmin@transformers:~# busctl tree --no-pager xyz.openbmc_project.Telemetry
`-/xyz
`-/xyz/openbmc_project
`-/xyz/openbmc_project/Telemetry
`-/xyz/openbmc_project/Telemetry/Reports
Regards
Habeeb
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: create telemetry metric report definition
2021-06-28 21:14 create telemetry metric report definition Mohammed.Habeeb ISV
@ 2021-06-30 9:24 ` Grobelny, Krzysztof
0 siblings, 0 replies; 2+ messages in thread
From: Grobelny, Krzysztof @ 2021-06-30 9:24 UTC (permalink / raw)
To: openbmc
Hello,
About your dbus call it should look like this:
busctl call xyz.openbmc_project.Telemetry
/xyz/openbmc_project/Telemetry/Reports
xyz.openbmc_project.Telemetry.ReportManager AddReport 'ssbbta(osss)'
'TelemetryService/ReportName' 'Periodic' true true 1000 1
'/xyz/openbmc_project/sensors/current/HSC_IOUT' 'SINGLE' 'MetricName'
'/redfish/v1/Chassis/Transformers_MotherBoard/Sensors/HSC_IOUT/Reading'
You are missing method signature 'ssbbta(osss)'
You are missing number of elements in array a(osss)
About your post request it works for me:
curl --user root:root --insecure --location --request POST
https://localhost:4443/redfish/v1/TelemetryService/MetricReportDefinitions
-d
'{"Id":"MyMetric","Metrics":[{"MetricId":"HSC_IOUT_reading","MetricProperties":["/redfish/v1/Chassis/Transformers_MotherBoard/Sensors/HSC_IOUT/Reading"]}],"MetricReportDefinitionType":"Periodic","ReportActions":["RedfishEvent","LogToMetricReportsCollection"],"Schedule":{"RecurrenceInterval":"PT1S"}}'
Are you sure your curl params are ok? Can you perform post with for
example invalid parameters to verify your request. You could change
RecurrenceInterval to something not recongnized or Id to contain invalid
characters like '@' and see if you get correct reponse from bmcweb.
BR, Krzysztof
On 2021-06-28 23:14, Mohammed.Habeeb ISV wrote:
> Hi
>
> How to create a telemetry metric report definition? I tried to set via dbus command as below, but got an error.
> busctl call xyz.openbmc_project.Telemetry /xyz/openbmc_project/Telemetry/Reports xyz.openbmc_project.Telemetry.ReportManager AddReport MyMetric Periodic 1 1 1000 "/xyz/openbmc_project/sensors/current/HSC_IOUT" "SINGLE" 1 "/redfish/v1/Chassis/Transformers_MotherBoard/Sensors/HSC_IOUT/Reading"
> Unknown signature type M.
>
> Tried to use redfish also, but got an internal service error. Please let me know if I miss anything here in both commands.
> habeeb@nsit-160:~/openbmc_nibu06$ curl -k -H "X-Auth-Token: $token" -X POST https://${bmc}/redfish/v1/TelemetryService/MetricReportDefinitions -d '{
> "Id":"MyMetric",
> "Metrics":[
> {
> "MetricId": "HSC_IOUT_reading",
> "MetricProperties":
> ["/redfish/v1/Chassis/Transformers_MotherBoard/Sensors/HSC_IOUT/Reading"]
> }
> ],
> "MetricReportDefinitionType": "Periodic",
> "ReportActions": ["RedfishEvent", "LogToMetricReportsCollection"],
> "Schedule": {
> "RecurrenceInterval": "PT1S"
> }
> }'
>
> {
> "error": {
> "@Message.ExtendedInfo": [
> {
> "@odata.type": "#Message.v1_1_1.Message",
> "Message": "The request failed due to an internal service error. The service is still operational.",
> "MessageArgs": [],
> "MessageId": "Base.1.8.1.InternalError",
> "MessageSeverity": "Critical",
> "Resolution": "Resubmit the request. If the problem persists, consider resetting the service."
> }
> ],
> "code": "Base.1.8.1.InternalError",
> "message": "The request failed due to an internal service error. The service is still operational."
> }
> }
> ---
> I see xyz.openbmc_project.Telemetry.ReportManager Interface is present.
> sysadmin@transformers:~# busctl tree --no-pager xyz.openbmc_project.Telemetry
> `-/xyz
> `-/xyz/openbmc_project
> `-/xyz/openbmc_project/Telemetry
> `-/xyz/openbmc_project/Telemetry/Reports
>
> Regards
> Habeeb
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-30 9:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-28 21:14 create telemetry metric report definition Mohammed.Habeeb ISV
2021-06-30 9:24 ` Grobelny, Krzysztof
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).