14 May 2023 09:06 PM - last edited on 15 May 2023 09:01 AM by Michal_Gebacki
I need to add/remove devices from a certain monitoring configuration for a certain SNMP extension.
Now, an existing monitoring configuration can be read, but when read, it doesn't show the community strings of existing devices. It does show some random number in the middle:
{
"ip": "192.168.1.1",
"port": 161,
"authentication": {
"type": "SNMPv2c",
"community": "***346***"
}
}
Every time I get the data, the numbers change. Does posting this data back to the API mean the community string will be maintained? What care has to be taken, so that Dynatrace doesn't interpret this Community string linearly?
BTW, I'm thinking in using the /extensions/{extensionName}/monitoringConfigurations/{configurationId}
endpoint. Or is there any other better way?
Solved! Go to Solution.
15 May 2023 12:02 PM
Hi,
community string contains a secret value, so API returns a temporary replacement. To prevent the secret value from being modified, the configuration should be updated with exactly the same temporary value.
BR,
Witold
15 May 2023 02:55 PM
Thanks for your answer! Given that the reply is different, or at least it seems, which limitations for reusing the temporary value apply?
16 May 2023 08:43 AM
The starred value for the secret is valid until the next update, so after first use in an update request it must be read again.