# Best way to update a monitoring configuration for SNMP extension?

**URL:** <https://community.dynatrace.com/t/best-way-to-update-a-monitoring-configuration-for-snmp-extension/39738>\
**Category:** Extensions\
**Tags:** snmp, extensions\
**Created:** [May 14, 2023, 8:06pm UTC](https://community.dynatrace.com/t/best-way-to-update-a-monitoring-configuration-for-snmp-extension/39738 "2023-05-14T20:06:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [May 14, 2023, 8:06pm UTC](https://community.dynatrace.com/t/best-way-to-update-a-monitoring-configuration-for-snmp-extension/39738/1 "2023-05-14T20:06:36Z")

</div>

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:

```markup
{
          "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?

---

<div class="post-metadata">

**Author:** ![witold\_turzansk](https://avatars.discourse-cdn.com/v4/letter/w/eb8c5e/32.png) [@witold\_turzansk](https://community.dynatrace.com/u/witold_turzansk)\
**Post date:** [May 15, 2023, 11:02am UTC](https://community.dynatrace.com/t/best-way-to-update-a-monitoring-configuration-for-snmp-extension/39738/2 "2023-05-15T11:02:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [May 15, 2023, 1:55pm UTC](https://community.dynatrace.com/t/best-way-to-update-a-monitoring-configuration-for-snmp-extension/39738/3 "2023-05-15T13:55:25Z")

</div>

[@witold\_turzansk](https://community.dynatrace.com/user/14970),

Thanks for your answer! Given that the reply is different, or at least it seems, which limitations for reusing the temporary value apply?

- Is it time driven, so that if I submit the update request in a certain amount of time, it will still apply?
- Is it request driven, so that after each “GET”, I have to do an update following?
- Combination of the above?
- Other?

---

<div class="post-metadata">

**Author:** ![witold\_turzansk](https://avatars.discourse-cdn.com/v4/letter/w/eb8c5e/32.png) [@witold\_turzansk](https://community.dynatrace.com/u/witold_turzansk)\
**Post date:** [May 16, 2023, 7:43am UTC](https://community.dynatrace.com/t/best-way-to-update-a-monitoring-configuration-for-snmp-extension/39738/4 "2023-05-16T07:43:37Z")

</div>

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.
