13 May 2021 10:34 PM
Hi All,
I am developing a plugin which makes a checking of a folder size. I want to know if it is possible to set the value of "displayname" dynamically, passing to it the value of the folder from the python code ?
Thanks in advance,
Axel
Solved! Go to Solution.
14 May 2021 02:23 PM
No the display name must be set in the configuration plugin.json file. Typically in a situation like this you would have the metric name be something like "Folder size" and then you can report each folder name and value separately as a dimension which can be done dynamically. You can always filter down to that dimension on charts etc... and have the same result.
Only other option that comes to mind is if you decided not to use the built in methods for reporting metrics specifically for extensions and instead reported metrics over the API. This lets you define the metrics on the fly however you see fit but requires you write the extension to use this, you may need to supply an api token in the config if it is not reporting to the OneAgent metric API, and as of now you specify a key (which could be dynamic) but there is no 'display name.'
I'd stick with the dimension approach.
19 May 2021 09:10 PM
Hello James,
I am trying with the dimensions but I not able to see each folder name at the keychart.
This is the plugin.json file:
19 May 2021 09:23 PM
The key charts will always aggregate dimensions. You'll see your dimensions under Further details or when creating a custom chart you'll have the option to split by dimension.
19 May 2021 09:57 PM
Hi James,
Thanks for helping.
I could see the dimensions on a custom chart.
How could see them under a Further details ? Is it posible to do that with a HOST based plugin such as this one ?
Thanks again