<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: AG extension - configuration upload issue in Extensions</title>
    <link>https://community.dynatrace.com/t5/Extensions/ActiveGate-extension-configuration-upload-issue/m-p/201068#M2639</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for your help &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/11520"&gt;@Mike_L&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;I will rework my json files to see if the new parameters are propagated. Because I don't want to update the parameters from the UI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 23 Dec 2022 14:46:41 GMT</pubDate>
    <dc:creator>MathieuB</dc:creator>
    <dc:date>2022-12-23T14:46:41Z</dc:date>
    <item>
      <title>ActiveGate extension - configuration upload issue</title>
      <link>https://community.dynatrace.com/t5/Extensions/ActiveGate-extension-configuration-upload-issue/m-p/200696#M2623</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have an ActiveGate extension, with valid &lt;EM&gt;plugin.json&lt;/EM&gt; and a&amp;nbsp;&lt;EM&gt;properties.json&lt;/EM&gt; to set configuration parameters.&lt;/P&gt;
&lt;P&gt;When I upload a new version of my extension, with new configuration, I see that the configuration parameters&amp;nbsp;&lt;U&gt;have not changed&lt;/U&gt;. [&lt;EM&gt;the version is incraised on the plugin.json and the upload is successful&lt;/EM&gt;]&lt;/P&gt;
&lt;P&gt;I see several issues :&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The parameters on the config UI have not been updated (&lt;EM&gt;Setting/Monitoring/Monitored technologies/MyPlugin/Endpoint configuration&lt;/EM&gt;)&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;--&amp;gt; Is it a bug or do I miss nothing on the build/upload process ?&lt;/FONT&gt;&lt;/LI&gt;
&lt;LI&gt;The extension is not restarted, so it continues to loop the &lt;STRONG&gt;query()&lt;/STRONG&gt; function. But I read my configuration parameters on the&lt;STRONG&gt;&amp;nbsp;initialize()&lt;/STRONG&gt; function, so the new parameters are not loaded.&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;--&amp;gt; How to restart the extension after a new build ?&lt;/FONT&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I see on the log that the new code has been deployed successfully.&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;I am quite new on my Dynatrace company, so maybe I miss something basic&amp;nbsp;&lt;/FONT&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_sweat:"&gt;😅&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;EM&gt;plugin.json :&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;{
	"name": "custom.remote.python.myplugin",
	"version": "0.945",
	"type": "python",
	"entity": "CUSTOM_DEVICE",
	"metricGroup": "myplugin",
	"technologies": ["MYPLUGIN"],
	"source": {
		"package": "activegate_plugin_myplugin",
		"className": "MyPlugin",
		"activation": "Remote"
	},
	"properties": [
		{
			"key": "debug",
			"type": "Dropdown",
			"dropdownValues" : ["WARNING", "INFO", "DEBUG"],
			"defaultValue" : "INFO"
		},
		{
			"key": "url",
			"type": "String"
		},
		{
			"key": "url2",
			"type": "String"
		}
	],
	"configUI": {
		"displayName": "MyPlugin",
		"properties" : [
			{"key" : "url", "displayName": "First URL", "displayOrder": 1},
			{"key" : "url2", "displayName": "Second URL", "displayOrder": 2},
			{"key" : "debug", "type":"String", "displayName": "Enable debug logging", "displayOrder": 3}
		]
	}
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;EM&gt;properties.json :&lt;/EM&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;{
	"debug": "DEBUG",
	"url": "https://google.fr",
	"url2": "https://google.com"
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 13:48:03 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/ActiveGate-extension-configuration-upload-issue/m-p/200696#M2623</guid>
      <dc:creator>MathieuB</dc:creator>
      <dc:date>2023-05-17T13:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: AG extension - configuration upload issue</title>
      <link>https://community.dynatrace.com/t5/Extensions/ActiveGate-extension-configuration-upload-issue/m-p/200833#M2625</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;The properties.json file is &lt;U&gt;only&lt;/U&gt; used during oneagent_simulate_plugin. The rest of the time the configuration is coming from the Dynatrace cluster. If the properties change you'll have to hit "update" in the Dynatrace UI to send the new properties to the ActiveGate. Once new configurations are sent the plugin will restart and run initialize again.&lt;/P&gt;
&lt;P&gt;The new code is loaded in whenever the RemotePluginModule or PluginAgent process (depending on ActiveGate/OneAgent) is restarted. The process is automatically restarted whenever a new version is found in a plugin.json. You can always force it by restarting the remote plugin or OneAgent service.&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 09:31:13 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/ActiveGate-extension-configuration-upload-issue/m-p/200833#M2625</guid>
      <dc:creator>Mike_L</dc:creator>
      <dc:date>2022-12-20T09:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: AG extension - configuration upload issue</title>
      <link>https://community.dynatrace.com/t5/Extensions/ActiveGate-extension-configuration-upload-issue/m-p/201068#M2639</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for your help &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/11520"&gt;@Mike_L&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;I will rework my json files to see if the new parameters are propagated. Because I don't want to update the parameters from the UI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 14:46:41 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/ActiveGate-extension-configuration-upload-issue/m-p/201068#M2639</guid>
      <dc:creator>MathieuB</dc:creator>
      <dc:date>2022-12-23T14:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: AG extension - configuration upload issue</title>
      <link>https://community.dynatrace.com/t5/Extensions/ActiveGate-extension-configuration-upload-issue/m-p/201069#M2640</link>
      <description>&lt;P&gt;If you don't want to update the parameters in the UI, maybe make them hardcoded in the python code (either in the script itself or by importing a json or so from the file system.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Dec 2022 15:07:38 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/ActiveGate-extension-configuration-upload-issue/m-p/201069#M2640</guid>
      <dc:creator>Mike_L</dc:creator>
      <dc:date>2022-12-23T15:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: AG extension - configuration upload issue</title>
      <link>https://community.dynatrace.com/t5/Extensions/ActiveGate-extension-configuration-upload-issue/m-p/201663#M2658</link>
      <description>&lt;P&gt;Hi again &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/11520"&gt;@Mike_L&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;So you said that the only way to update the parameters from the plugin.json is to update them in the UI ?&lt;BR /&gt;Therefore, I do not understand why there is a 'defaultValue' in the json.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I perform some test and after the update (with the&amp;nbsp;&lt;EM&gt;build_plugin&lt;/EM&gt; command), the new code is running but the script starts at the &lt;STRONG&gt;&lt;EM&gt;query()&lt;/EM&gt;&lt;/STRONG&gt; function and not the &lt;STRONG&gt;&lt;EM&gt;initialize()&lt;/EM&gt;&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;class DemoPluginRemote(RemoteBasePlugin):
    def initialize(self, **kwargs):
        self.url = self.config["url"]

    def query(self, **kwargs):
        #plugin routine&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So maybe my issue cames from the&amp;nbsp;&lt;SPAN&gt;RemotePluginModule&amp;nbsp;that do no restart. I will look on the ActiveGate configuration.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 16:09:32 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/ActiveGate-extension-configuration-upload-issue/m-p/201663#M2658</guid>
      <dc:creator>MathieuB</dc:creator>
      <dc:date>2023-01-06T16:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: AG extension - configuration upload issue</title>
      <link>https://community.dynatrace.com/t5/Extensions/ActiveGate-extension-configuration-upload-issue/m-p/201667#M2659</link>
      <description>&lt;P&gt;If you're fine with the ability of changing it in the UI then you can do something like this in the python code:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;def initialize(self, **kwargs):
  config = kwargs['config']
  self.url = config["url"].strip()

  if self.url == '':
    self.url = "https://dynatrace.com"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Jan 2023 16:26:30 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/ActiveGate-extension-configuration-upload-issue/m-p/201667#M2659</guid>
      <dc:creator>Mike_L</dc:creator>
      <dc:date>2023-01-06T16:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: AG extension - configuration upload issue</title>
      <link>https://community.dynatrace.com/t5/Extensions/ActiveGate-extension-configuration-upload-issue/m-p/201792#M2661</link>
      <description>&lt;P&gt;No I don't want to hardcode parameters.&lt;/P&gt;&lt;P&gt;So I'm going to read the properties.json or get parameters from&amp;nbsp;&lt;EM&gt;kwargs['json_config']['properties']&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Thanks for your help Mike_L.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jan 2023 15:40:03 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/ActiveGate-extension-configuration-upload-issue/m-p/201792#M2661</guid>
      <dc:creator>MathieuB</dc:creator>
      <dc:date>2023-01-09T15:40:03Z</dc:date>
    </item>
  </channel>
</rss>

