<?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: OneAgent Plugin: Oracle Process Group Instance Names in Extensions</title>
    <link>https://community.dynatrace.com/t5/Extensions/OneAgent-Plugin-Oracle-Process-Group-Instance-Names/m-p/121696#M1054</link>
    <description>&lt;P&gt;Hi there, thanks for the answer.&lt;/P&gt;&lt;P&gt;I've done that, but the "entity" seems to name it only "Oracle Database", there seems to be no hint which instance it is:&lt;/P&gt;&lt;PRE&gt;&lt;OL&gt;&lt;LI&gt;{ key=entityid=ce4f7357c3bf4ed5 ; name="Oracle Database" ; type="Oracle" }&lt;/LI&gt;&lt;/OL&gt;&lt;/PRE&gt;&lt;P&gt;Is there a way to get "more" information to that entity? The name is the Process Groups one, not the instance name itself as it seems.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 12 Feb 2021 09:15:58 GMT</pubDate>
    <dc:creator>STiAT</dc:creator>
    <dc:date>2021-02-12T09:15:58Z</dc:date>
    <item>
      <title>OneAgent Plugin: Oracle Process Group Instance Names</title>
      <link>https://community.dynatrace.com/t5/Extensions/OneAgent-Plugin-Oracle-Process-Group-Instance-Names/m-p/121694#M1052</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I've been trying to implement a custom plugin for Oracle, since Insights does not fully fit our needs. The issue I seem to have is plugin activation respectively actually finding the process group instances.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If I see that correctly in dynatrace, the process group name should be "Oralce Database", the technology "ORACLE_DB".&lt;/P&gt;&lt;P&gt;from the plugin.json&lt;/P&gt;&lt;PRE&gt;"entity": "PROCESS_GROUP_INSTANCE",&lt;BR /&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;"technologies":&amp;nbsp;[&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;"ORACLE_DB"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; ],&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In the simulator I've used the following&lt;/P&gt;&lt;PRE&gt;        {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "group_name": "Oracle Database",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;"group_instance_id":2,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;"processes":[&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;"process_name":"Oracle&amp;nbsp;Database&amp;nbsp;(gccon)"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ],&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;"properties":&amp;nbsp;{"Technologies":&amp;nbsp;"ORACLE_DB"}&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;After the simulator is triggered, I read the process_name:&lt;/P&gt;&lt;PRE&gt;p_list = self.find_all_processes(lambda entry: entry.process_name.startswith("Oracle Database"))&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; active_dbs = {}&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;for&amp;nbsp;process&amp;nbsp;in&amp;nbsp;p_list:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; m = re.search("^.*?\((.*)?\)$",&amp;nbsp;process[1].process_name)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;if(m):&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; active_dbs[m.group(1)] = process[0].group_instance_id&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The issue is, that this does not trigger the plugin on the actual server, at least it does not seem as if I do get any "active_dbs". Looking at the support archives, it seems that "Oracle Database (gccon)" is actually not the process name but the "inherited name", and my guess is entry.process_name.startswith("Oracle Database") does not find it since process_name seems not to be what it displays in Dynatrace.&lt;/P&gt;&lt;P&gt;What's the proper way to get the process group instances for the oracle database in this case? The inherited name is a nice thing, since I can identify the actual database instance to connect to.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Georg&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 08:28:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/OneAgent-Plugin-Oracle-Process-Group-Instance-Names/m-p/121694#M1052</guid>
      <dc:creator>STiAT</dc:creator>
      <dc:date>2021-02-12T08:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: OneAgent Plugin: Oracle Process Group Instance Names</title>
      <link>https://community.dynatrace.com/t5/Extensions/OneAgent-Plugin-Oracle-Process-Group-Instance-Names/m-p/121695#M1053</link>
      <description>&lt;P&gt;Hi, if you're sure that the query method is executing (just do a logger as the first line) then what I would do if I were you is to change the extension to run once per Oracle process by setting this in the plugin.json:&lt;/P&gt;&lt;PRE&gt;"activation": "SnapshotEntry"&lt;/PRE&gt;&lt;P&gt;Once the extension is initiated once per process you can log the full snapshot of the entity that each extension thread connects to, by doing this:&lt;/P&gt;&lt;PRE&gt;logger.info(kwargs["associated_entity"])&lt;/PRE&gt;&lt;P&gt;From there on you can change your code to get any property that Dynatrace has seen.&lt;/P&gt;&lt;P&gt;Out of curiosity, what are you missing in the Oracle DB Insights?&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 08:41:52 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/OneAgent-Plugin-Oracle-Process-Group-Instance-Names/m-p/121695#M1053</guid>
      <dc:creator>Mike_L</dc:creator>
      <dc:date>2021-02-12T08:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: OneAgent Plugin: Oracle Process Group Instance Names</title>
      <link>https://community.dynatrace.com/t5/Extensions/OneAgent-Plugin-Oracle-Process-Group-Instance-Names/m-p/121696#M1054</link>
      <description>&lt;P&gt;Hi there, thanks for the answer.&lt;/P&gt;&lt;P&gt;I've done that, but the "entity" seems to name it only "Oracle Database", there seems to be no hint which instance it is:&lt;/P&gt;&lt;PRE&gt;&lt;OL&gt;&lt;LI&gt;{ key=entityid=ce4f7357c3bf4ed5 ; name="Oracle Database" ; type="Oracle" }&lt;/LI&gt;&lt;/OL&gt;&lt;/PRE&gt;&lt;P&gt;Is there a way to get "more" information to that entity? The name is the Process Groups one, not the instance name itself as it seems.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 12 Feb 2021 09:15:58 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/OneAgent-Plugin-Oracle-Process-Group-Instance-Names/m-p/121696#M1054</guid>
      <dc:creator>STiAT</dc:creator>
      <dc:date>2021-02-12T09:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: OneAgent Plugin: Oracle Process Group Instance Names</title>
      <link>https://community.dynatrace.com/t5/Extensions/OneAgent-Plugin-Oracle-Process-Group-Instance-Names/m-p/121697#M1055</link>
      <description>&lt;P&gt;What would probably be interesting in this case is to get a full process snapshot of the host to test with in a json as expected by the simulator_snapshot.json... that would make testing a lot easier. Is there a way to do that?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 11:21:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/OneAgent-Plugin-Oracle-Process-Group-Instance-Names/m-p/121697#M1055</guid>
      <dc:creator>STiAT</dc:creator>
      <dc:date>2021-02-12T11:21:23Z</dc:date>
    </item>
    <item>
      <title>Re: OneAgent Plugin: Oracle Process Group Instance Names</title>
      <link>https://community.dynatrace.com/t5/Extensions/OneAgent-Plugin-Oracle-Process-Group-Instance-Names/m-p/121698#M1056</link>
      <description>&lt;P&gt;If the above command (when executed as part of a deployed OneAgent Extension, not through the simulator) doesn’t have the information then you are out of luck and might have to get it from somewhere else than the snapshot.&lt;/P&gt;&lt;P&gt;If you do get something else back when it is deployed then you can take that output and drop it into your process snapshot.&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 12:20:50 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/OneAgent-Plugin-Oracle-Process-Group-Instance-Names/m-p/121698#M1056</guid>
      <dc:creator>Mike_L</dc:creator>
      <dc:date>2021-02-12T12:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: OneAgent Plugin: Oracle Process Group Instance Names</title>
      <link>https://community.dynatrace.com/t5/Extensions/OneAgent-Plugin-Oracle-Process-Group-Instance-Names/m-p/121699#M1057</link>
      <description>&lt;P&gt;Not simply. The process snapshot (but in a bit different format) can be found in the logs of the plugin agent once a custom extension has been deployed. It is usually easier to use the method I wrote about in the other reply. &lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 12:22:20 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/OneAgent-Plugin-Oracle-Process-Group-Instance-Names/m-p/121699#M1057</guid>
      <dc:creator>Mike_L</dc:creator>
      <dc:date>2021-02-12T12:22:20Z</dc:date>
    </item>
    <item>
      <title>Re: OneAgent Plugin: Oracle Process Group Instance Names</title>
      <link>https://community.dynatrace.com/t5/Extensions/OneAgent-Plugin-Oracle-Process-Group-Instance-Names/m-p/121700#M1058</link>
      <description>&lt;P&gt;Unless the ORACLE_DB technology type doesn't bring back the correct entity. But my post in the other question regarding the process snapshot location would help you with that.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 17:11:20 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/OneAgent-Plugin-Oracle-Process-Group-Instance-Names/m-p/121700#M1058</guid>
      <dc:creator>Mike_L</dc:creator>
      <dc:date>2021-02-12T17:11:20Z</dc:date>
    </item>
  </channel>
</rss>

