<?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 perfmon APi did not work with Python in Management</title>
    <link>https://community.cisco.com/t5/management/perfmon-api-did-not-work-with-python/m-p/3458814#M706</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, community!&lt;/P&gt;&lt;P&gt;I have tried to collect perfmonCollectCounterData info from my Cisco Unified Communication Manager via Perfmon API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I have got next error:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;'&amp;lt;?xml version=\'1.0\' encoding=\'UTF-8\'?&amp;gt;&amp;lt;soapenv:Envelope xmlns:soapenv="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.xmlsoap.org/soap/envelope/" rel="nofollow" target="_blank"&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&amp;lt;soapenv:Body&amp;gt;&amp;lt;soapenv:Fault&amp;gt;&amp;lt;faultcode&amp;gt;soapenv:Server&amp;lt;/faultcode&amp;gt;&amp;lt;faultstring&amp;gt;Query counter data failed. Error=9 ErrorMsg=null&amp;lt;/faultstring&amp;gt;&amp;lt;detail /&amp;gt;&amp;lt;/soapenv:Fault&amp;gt;&amp;lt;/soapenv:Body&amp;gt;&amp;lt;/soapenv:Envelope&amp;gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But other operation, for example, perfmonOpenSession works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is Python script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import requests&lt;/P&gt;&lt;P&gt;from requests.auth import HTTPBasicAuth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;def run():&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://CUCM_IP:8443/perfmonservice2/services/PerfmonService?wsdl" rel="nofollow" target="_blank"&gt;https://CUCM_IP:8443/perfmonservice2/services/PerfmonService?wsdl&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; headers = {'content-type': 'text/xml', 'SOAPAction': "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.cisco.com/ast/soap/action/#PerfmonPort#perfmonCollectCounterData" rel="nofollow" target="_blank"&gt;http://schemas.cisco.com/ast/soap/action/#PerfmonPort#perfmonCollectCounterData&lt;/A&gt;&lt;SPAN&gt;"}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; body ="""&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;soapenv:Envelope xmlns:soapenv="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.xmlsoap.org/soap/envelope/" rel="nofollow" target="_blank"&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/A&gt;&lt;SPAN&gt;" xmlns:soap="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.cisco.com/ast/soap" rel="nofollow" target="_blank"&gt;http://schemas.cisco.com/ast/soap&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;lt;soapenv:Header/&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;lt;soapenv:Body&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;soap:perfmonCollectCounterData&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;soap:Host&amp;gt;CUCM_IP&amp;lt;/soap:Host&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;soap:Object&amp;gt;Cisco CallManager&amp;lt;/soap:Object&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/soap:perfmonCollectCounterData&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/soapenv:Body&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/soapenv:Envelope&amp;gt; """&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; response = requests.post(url,data=body,headers=headers,verify=False,auth=HTTPBasicAuth("USER", "PASSWORD" ))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print response&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; import pdb;pdb.set_trace()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if __name__ == "__main__":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please help me with this issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 May 2017 12:47:23 GMT</pubDate>
    <dc:creator>zadorojnuiandriu</dc:creator>
    <dc:date>2017-05-17T12:47:23Z</dc:date>
    <item>
      <title>perfmon APi did not work with Python</title>
      <link>https://community.cisco.com/t5/management/perfmon-api-did-not-work-with-python/m-p/3458814#M706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, community!&lt;/P&gt;&lt;P&gt;I have tried to collect perfmonCollectCounterData info from my Cisco Unified Communication Manager via Perfmon API.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I have got next error:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;'&amp;lt;?xml version=\'1.0\' encoding=\'UTF-8\'?&amp;gt;&amp;lt;soapenv:Envelope xmlns:soapenv="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.xmlsoap.org/soap/envelope/" rel="nofollow" target="_blank"&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&amp;lt;soapenv:Body&amp;gt;&amp;lt;soapenv:Fault&amp;gt;&amp;lt;faultcode&amp;gt;soapenv:Server&amp;lt;/faultcode&amp;gt;&amp;lt;faultstring&amp;gt;Query counter data failed. Error=9 ErrorMsg=null&amp;lt;/faultstring&amp;gt;&amp;lt;detail /&amp;gt;&amp;lt;/soapenv:Fault&amp;gt;&amp;lt;/soapenv:Body&amp;gt;&amp;lt;/soapenv:Envelope&amp;gt;'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But other operation, for example, perfmonOpenSession works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is Python script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;import requests&lt;/P&gt;&lt;P&gt;from requests.auth import HTTPBasicAuth&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;def run():&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; url="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://CUCM_IP:8443/perfmonservice2/services/PerfmonService?wsdl" rel="nofollow" target="_blank"&gt;https://CUCM_IP:8443/perfmonservice2/services/PerfmonService?wsdl&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; headers = {'content-type': 'text/xml', 'SOAPAction': "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.cisco.com/ast/soap/action/#PerfmonPort#perfmonCollectCounterData" rel="nofollow" target="_blank"&gt;http://schemas.cisco.com/ast/soap/action/#PerfmonPort#perfmonCollectCounterData&lt;/A&gt;&lt;SPAN&gt;"}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; body ="""&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;lt;soapenv:Envelope xmlns:soapenv="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.xmlsoap.org/soap/envelope/" rel="nofollow" target="_blank"&gt;http://schemas.xmlsoap.org/soap/envelope/&lt;/A&gt;&lt;SPAN&gt;" xmlns:soap="&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://schemas.cisco.com/ast/soap" rel="nofollow" target="_blank"&gt;http://schemas.cisco.com/ast/soap&lt;/A&gt;&lt;SPAN&gt;"&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;lt;soapenv:Header/&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;lt;soapenv:Body&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;soap:perfmonCollectCounterData&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;soap:Host&amp;gt;CUCM_IP&amp;lt;/soap:Host&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;soap:Object&amp;gt;Cisco CallManager&amp;lt;/soap:Object&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/soap:perfmonCollectCounterData&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/soapenv:Body&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/soapenv:Envelope&amp;gt; """&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; response = requests.post(url,data=body,headers=headers,verify=False,auth=HTTPBasicAuth("USER", "PASSWORD" ))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print response&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; import pdb;pdb.set_trace()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if __name__ == "__main__":&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; run()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please help me with this issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 May 2017 12:47:23 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/perfmon-api-did-not-work-with-python/m-p/3458814#M706</guid>
      <dc:creator>zadorojnuiandriu</dc:creator>
      <dc:date>2017-05-17T12:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: perfmon APi did not work with Python</title>
      <link>https://community.cisco.com/t5/management/perfmon-api-did-not-work-with-python/m-p/3458815#M707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andrii,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Moving your question under UC Manager Serviceability community for getting more visibility of the support engineers.&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Geevarghese&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 30 May 2017 10:29:04 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/perfmon-api-did-not-work-with-python/m-p/3458815#M707</guid>
      <dc:creator>Geevarghese Cheria</dc:creator>
      <dc:date>2017-05-30T10:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: perfmon APi did not work with Python</title>
      <link>https://community.cisco.com/t5/management/perfmon-api-did-not-work-with-python/m-p/3458816#M708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is a Python and Requests issue.&amp;nbsp; I suggest you find out who supports Requests and ask them.&amp;nbsp; You'll need to show them the Perfmon WSDL so they can try to figure out why it's not interpreting your request correctly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Jun 2017 19:06:42 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/perfmon-api-did-not-work-with-python/m-p/3458816#M708</guid>
      <dc:creator>npetrele</dc:creator>
      <dc:date>2017-06-26T19:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: perfmon APi did not work with Python</title>
      <link>https://community.cisco.com/t5/management/perfmon-api-did-not-work-with-python/m-p/3458817#M709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your Python code seems to work unchanged against my CUCM 10.5 lab system. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there is an internal issue with the RIS component (or something else in CUCM), it's possible that restarting the CUCM may correct it (not ideal, of course.)&amp;nbsp; I would recommend opening a ticket with DevNet developer support for detailed troubleshooting: &lt;A href="https://developer.cisco.com/site/devnet/support/" title="https://developer.cisco.com/site/devnet/support/"&gt;Cisco DevNet: DevNet Developer Support&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Jul 2017 21:26:31 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/perfmon-api-did-not-work-with-python/m-p/3458817#M709</guid>
      <dc:creator>dstaudt</dc:creator>
      <dc:date>2017-07-13T21:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: perfmon APi did not work with Python</title>
      <link>https://community.cisco.com/t5/management/perfmon-api-did-not-work-with-python/m-p/4688695#M3950</link>
      <description>&lt;P&gt;Hello&amp;nbsp;zadorojnuiandriu,&lt;/P&gt;
&lt;P&gt;I have also encountered this issue. In my case, the "&lt;SPAN&gt;Query counter data failed. Error=9 ErrorMsg=null" was because the element "Host" was incorrect (did not exist) for the "perfmonCollectCounterData" name space. In other words, I had the "&amp;lt;soap:Host&amp;gt;...&amp;lt;/soap:Host&amp;gt;" part wrong.&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;I suggest you check your "&amp;lt;soap:Host&amp;gt;CUCM_IP&amp;lt;/soap:Host&amp;gt;" as you probably have the same problem.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;To find the correct value, g&lt;FONT face="inherit"&gt;o to the Cisco Unified CM Administration and navigate to System -&amp;gt; Server. Find what the &lt;/FONT&gt;IP&lt;FONT face="inherit"&gt;&amp;nbsp;or hostname is there. FYI, you don't need to use the FQDN. For example you can use "&amp;lt;soap:Host&amp;gt;cucm1&amp;lt;/soap:Host&amp;gt;" where you have "cucm1.example.com" configured, but you cannot use the same when you have "cucm1-something-else.example.com". Similarly, you can use IPv4, provided that the address is the same.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;Dominic D. Wasserzug&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 15:54:43 GMT</pubDate>
      <guid>https://community.cisco.com/t5/management/perfmon-api-did-not-work-with-python/m-p/4688695#M3950</guid>
      <dc:creator>dwasserzug1</dc:creator>
      <dc:date>2022-09-16T15:54:43Z</dc:date>
    </item>
  </channel>
</rss>

