Is there a way to have this widget display the string instead of the numeric value?
Is there a way to have this widget display the string instead of the numeric value?
Yes, you can report on the string value. I have had to create reports to do it. I was using swql.
You will need the value-to-monitor ID. This SWQL query can produce that and gives you the names of stuff to help isolate what you want, and then some.
SELECT vtm.ID, vtm.RequestDetailsId, ap.Name as APIPoller, vtm.DisplayName, vtm.StringToNumberTransformationOtherValues, vtm.Metric, vtm.ApiPollerId FROM Orion.APIPoller.ValueToMonitor vtm JOIN Orion.APIPoller.ApiPoller ap on ap.ID = vtm.ApiPollerId
The next swql snippet can report on the string value. Replace XXX with the vtm.ID you want from above and you should get the string and the displayname of the metric.
SELECT str.text, vtm.displayname FROM Orion.APIPoller.ValueToMonitor vtm JOIN Orion.APIPoller.StringToNumberTransformationRule str ON vtm.id = str.valuetomonitorid Where vtm.id = XXX Group by vtm.Metric, str.text, vtm.displayname,str.number HAVING vtm.metric = str.number
This works well in the KPI widgets in the Modern Dashboards.
Yes, you can report on the string value. I have had to create reports to do it. I was using swql.
You will need the value-to-monitor ID. This SWQL query can produce that and gives you the names of stuff to help isolate what you want, and then some.
SELECT vtm.ID, vtm.RequestDetailsId, ap.Name as APIPoller, vtm.DisplayName, vtm.StringToNumberTransformationOtherValues, vtm.Metric, vtm.ApiPollerId FROM Orion.APIPoller.ValueToMonitor vtm JOIN Orion.APIPoller.ApiPoller ap on ap.ID = vtm.ApiPollerId
The next swql snippet can report on the string value. Replace XXX with the vtm.ID you want from above and you should get the string and the displayname of the metric.
SELECT str.text, vtm.displayname FROM Orion.APIPoller.ValueToMonitor vtm JOIN Orion.APIPoller.StringToNumberTransformationRule str ON vtm.id = str.valuetomonitorid Where vtm.id = XXX Group by vtm.Metric, str.text, vtm.displayname,str.number HAVING vtm.metric = str.number
This works well in the KPI widgets in the Modern Dashboards.
@marcrobinson this is super interesting, really goes a way to fixing a hole in the use case for API pollers
Am i right in thinking that you're describing a way to pull pre-defined text out, where you've defined {string} = {number} within an api monitor?
I've not seen a way to pull non-defined text out (say you're querying a system for it's internal alerts and you want to read out whatever comes back), if that does work within your SWQL could you elaborate on how?
Short Answer - Yes you can do this with PRE-defined text. Look at the predefined Microsoft 365 Admin Center API template is one good example. Longer answer - the text that you convert must be pre-defined, so the conversion does a quick text match and the number can be substituted. See image below from the template. You capture the string result from ServiceStatus and convert it. The string can be retrieved via swql for a human readable output later. Also you need to know the amount of potential pre-defined strings so you can enumerate them. See below again. You do have to do this for each metric - repetitive and worthy of a feature release (Nudge please). Handling the non-defined text seems to be beyond of the current scope of the API poller from what I have seen. Non defined answers, such as the Microsoft incident number and the description of the issue - hmmmm Powershell anyone? I will let ANYONE else please correct me. jan.rachwalik has had some very detailed and useful posts on the api poller hidden in thwack, perhaps he can comment. Pretty please?
Super helpful, thank you!
Still very much hoping for a regular text save at some point. I've spoke to jan.rachwalik on the topic prior, still hoping!
SolarWinds solutions are rooted in our deep connection to our user base in the THWACK® online community. More than 195,000 members are here to solve problems, share technology and best practices, and directly contribute to our product development process.