<?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: Check PAN status programatically in Network Access Control</title>
    <link>https://community.cisco.com/t5/network-access-control/check-pan-status-programatically/m-p/3499227#M525041</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is added in ISE 2.2 but, of course, everyone should be using 2.2. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 May 2017 00:28:13 GMT</pubDate>
    <dc:creator>hslai</dc:creator>
    <dc:date>2017-05-09T00:28:13Z</dc:date>
    <item>
      <title>Check PAN status programatically</title>
      <link>https://community.cisco.com/t5/network-access-control/check-pan-status-programatically/m-p/3499224#M525038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anybody know if it is possible to somehow get PAN role (Active/Standby) programmatically (via API) or manually via CLI (SSH session)?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use case is: I have an API script running every night to do certain stuff on ISE (clean up Guests in my particular case). However my script is always connecting to a particular IP/hostname I specify in a cron job or manually via script options. If failover happens, I have no way to connect to a newly active (primary) PAN to do a nightly job.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I could use either API or SSH (via Expect/Pexpect) but I could find neither API nor CLI way of doing that - that is, of getting a definite answer on whether this particular box is Primary or Secondary PAN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a line in "show tech" but triggering show tech every time I need to get a role is a bit too heavy, I think:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Node Config Details&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NAME&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PERSONA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ROLE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACTIVE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; REPLICATION&lt;/P&gt;&lt;P&gt;------------------- --------------- ---------- ---------- ---------------&lt;/P&gt;&lt;P&gt;test-ISE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PAN,MNT,PSN&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; STANDALONE ACTIVE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Not Applicable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 May 2017 15:18:37 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/check-pan-status-programatically/m-p/3499224#M525038</guid>
      <dc:creator>Amir Asfandyarov</dc:creator>
      <dc:date>2017-05-08T15:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Check PAN status programatically</title>
      <link>https://community.cisco.com/t5/network-access-control/check-pan-status-programatically/m-p/3499225#M525039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I responded to your original thread with archived discussions in using the fact that we would be getting HTTP 401 if performing non-read-only CRUD operations against non-Primary node. You could also parse the application deployment.log but again it's too heavy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2017 00:06:09 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/check-pan-status-programatically/m-p/3499225#M525039</guid>
      <dc:creator>hslai</dc:creator>
      <dc:date>2017-05-09T00:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Check PAN status programatically</title>
      <link>https://community.cisco.com/t5/network-access-control/check-pan-status-programatically/m-p/3499226#M525040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amir&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There doesn't seem to be a CLI show command, nor does the SNMP MIB offer any hints.&amp;nbsp; But there is another way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can enable the ERS in your Policy Nodes and then run a curl command to query via REST API.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="107032" alt="ERS.PNG" class="image-1 jive-image" src="https://community.cisco.com/legacyfs/online/fusion/107032_ERS.PNG" style="width: 620px; height: 303px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the examples below, 192.168.21.100 is my PAN (it should always have a good view of the system status) - you would have to make this flexible to ensure you hit the currently active PAN.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To demonstrate the return values, I use the Get-By-Name method to query status of "ise02" (which is a PSN), and "ise01" (which is my one and only PAN).&amp;nbsp; I think this reflects the Admin node personas and their status.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;abier@centos ~]$ &lt;STRONG&gt;&lt;SPAN&gt;curl --tlsv1.1 -s -k -X GET -H 'ACCEPT: application/json' '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://ers:password@192.168.21.100:9060/ers/config/node/name/ise02" rel="nofollow" target="_blank"&gt;https://ers:password@192.168.21.100:9060/ers/config/node/name/ise02&lt;/A&gt;&lt;SPAN&gt;' | grep PapNode&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "isPapNode" : false,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "isPrimaryPapNode" : false,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[abier@centos ~]$ &lt;STRONG&gt;&lt;SPAN&gt;curl --tlsv1.1 -s -k -X GET -H 'ACCEPT: application/json' '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://ers:password@192.168.21.100:9060/ers/config/node/name/ise01" rel="nofollow" target="_blank"&gt;https://ers:password@192.168.21.100:9060/ers/config/node/name/ise01&lt;/A&gt;&lt;SPAN&gt;' | grep PapNode&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "isPapNode" : true,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "isPrimaryPapNode" : true,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2017 00:10:52 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/check-pan-status-programatically/m-p/3499226#M525040</guid>
      <dc:creator>Arne Bier</dc:creator>
      <dc:date>2017-05-09T00:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: Check PAN status programatically</title>
      <link>https://community.cisco.com/t5/network-access-control/check-pan-status-programatically/m-p/3499227#M525041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is added in ISE 2.2 but, of course, everyone should be using 2.2. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2017 00:28:13 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/check-pan-status-programatically/m-p/3499227#M525041</guid>
      <dc:creator>hslai</dc:creator>
      <dc:date>2017-05-09T00:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Check PAN status programatically</title>
      <link>https://community.cisco.com/t5/network-access-control/check-pan-status-programatically/m-p/3499228#M525042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Arne!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many-many thanks for your answer - yes, that is exactly what I needed but this is 2.2-specific, that is why I haven't noticed that in my 2.1 SDK portal &lt;IMG src="https://community.cisco.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;That is very useful info still, many thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, Amir&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2017 08:53:00 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/check-pan-status-programatically/m-p/3499228#M525042</guid>
      <dc:creator>Amir Asfandyarov</dc:creator>
      <dc:date>2017-05-09T08:53:00Z</dc:date>
    </item>
    <item>
      <title>Re: Check PAN status programatically</title>
      <link>https://community.cisco.com/t5/network-access-control/check-pan-status-programatically/m-p/3499229#M525043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Arne's method is the suggested one, I think.&lt;/P&gt;&lt;P&gt;Meanwhile, for those of us who are not yet on 2.2 &lt;IMG src="https://community.cisco.com/legacyfs/online/emoticons/happy.png" /&gt;, the following will work: try to create user via API.&lt;/P&gt;&lt;P&gt;While primary will respond with HTTP 201, Secondary will tell you:&lt;/P&gt;&lt;P&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;html&amp;gt;&lt;/P&gt;&lt;P&gt; &amp;lt;head&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;title&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; - Error report&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;/title&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;style type="text/css"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;/style&amp;gt;&lt;/P&gt;&lt;P&gt; &amp;lt;/head&amp;gt;&lt;/P&gt;&lt;P&gt; &amp;lt;body&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;h1&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; HTTP Status 401 - The requested operation is allowd on PAP Node only.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;/h1&amp;gt;&lt;/P&gt;&lt;P&gt;---snip---&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can parse response (I did that with Beautifulsoup on a python - so picking h1 header) and correctly identify secondary/primary PAN. Not an ideal solution, but works well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2017 14:46:10 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-access-control/check-pan-status-programatically/m-p/3499229#M525043</guid>
      <dc:creator>Amir Asfandyarov</dc:creator>
      <dc:date>2017-05-09T14:46:10Z</dc:date>
    </item>
  </channel>
</rss>

