<?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: Query NAC Database in ExtremeCloud IQ- Site Engine Management Center</title>
    <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/query-nac-database/m-p/72810#M8349</link>
    <description>Mike,&lt;BR /&gt;
&lt;BR /&gt;
as Stephan mentioned: if you query the end-system count from a NAC appliance's DB you will need to repeat this process on all your NAC appliances. It is easier to query the total count of all end-systems from all NAC appliances from the XMC database. &lt;BR /&gt;
&lt;BR /&gt;
That said, we generally do not encourage customers/partners to directly query the DB. The preferred option would be to query end-system (and other) data via the API. If you have XMC v8.2 a simple way would be to pull the list of all MACs and then count them yourselve through some script. To test this, use your browser to go to your XMC at (use your XMC IP)&lt;BR /&gt;
&lt;BR /&gt;
https://10.65.47.90:8443/nbi/graphiql/index.html&lt;BR /&gt;
&lt;BR /&gt;
On the left side insert&lt;BR /&gt;
{&lt;BR /&gt;
 accessControl{&lt;BR /&gt;
  allEndSystemMacs&lt;BR /&gt;
 }&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
Then click the play button above and you should see the list of all MACs on the right. &lt;BR /&gt;
&lt;BR /&gt;
Kurt</description>
    <pubDate>Fri, 01 Mar 2019 15:50:09 GMT</pubDate>
    <dc:creator>Kurt_Semba</dc:creator>
    <dc:date>2019-03-01T15:50:09Z</dc:date>
    <item>
      <title>Query NAC Database</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/query-nac-database/m-p/72807#M8346</link>
      <description>Hi, can anybody tell me, how I can query the database on the NAC?&lt;BR /&gt;
&lt;BR /&gt;
Hint:&lt;BR /&gt;
I try to make a query for the actual count of end systems on the NAC?&lt;BR /&gt;
I have found, that a table "end_system" in the database exist, but the query:&lt;BR /&gt;
&lt;I&gt;tag=# select end_system_id from end_system&lt;/I&gt;&lt;BR /&gt;
give me no results.&lt;BR /&gt;
&lt;BR /&gt;
Regards&lt;BR /&gt;
Michael</description>
      <pubDate>Thu, 28 Feb 2019 16:55:23 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/query-nac-database/m-p/72807#M8346</guid>
      <dc:creator>TeamNetzBetrieb</dc:creator>
      <dc:date>2019-02-28T16:55:23Z</dc:date>
    </item>
    <item>
      <title>Re: Query NAC Database</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/query-nac-database/m-p/72808#M8347</link>
      <description>Hello Michael,&lt;BR /&gt;
&lt;BR /&gt;
there are more steps to get your requested date. First of all you have to use the XMC database not a NAC database. All data are transmitted and aggregated in XMC.&lt;BR /&gt;
&lt;BR /&gt;
Here is a excellent article how to connect to the database from &lt;USER-MENTION data-id="6835946"&gt;@Martin Flammia&lt;/USER-MENTION&gt; (he is here in the HUB, too):&lt;BR /&gt;
http://www.extremenetworks.guru/extreme-networks-managemet-netsight-access-database-externally/&lt;BR /&gt;
&lt;BR /&gt;
If you are connected to the database (the correct one is the netsightrpt database for the statistics), you have to check where your data are stored. For that "select * from rpt_statistics" to receive all statistics availably on your system. Please be awary that entries differ from installation to installation.&lt;BR /&gt;
&lt;BR /&gt;
Search in the output for your statistic. I think the display name is "NAC End-Systems seen last 24 hours "&lt;BR /&gt;
Take the ID form the first column.&lt;BR /&gt;
&lt;BR /&gt;
Now you can do an "Select * from rpt_default_day where statisticid = &lt;BR /&gt;
&lt;BR /&gt;
Have fun.&lt;BR /&gt;
&lt;BR /&gt;
Best regards&lt;BR /&gt;
Stephan</description>
      <pubDate>Thu, 28 Feb 2019 21:03:06 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/query-nac-database/m-p/72808#M8347</guid>
      <dc:creator>StephanH</dc:creator>
      <dc:date>2019-02-28T21:03:06Z</dc:date>
    </item>
    <item>
      <title>Re: Query NAC Database</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/query-nac-database/m-p/72809#M8348</link>
      <description>Hi, thank you for your answer. I will test this.&lt;BR /&gt;
&lt;BR /&gt;
In the meantime, I have found another method. I have made a script with the following statement:&lt;BR /&gt;
&lt;B&gt;psql -U postgres -d tag -c "select count(*) from end_system" | grep -A1 - | grep -v -&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
The script open the database "tag" (the postgres database on the nac) and count the entries in the table end_system. The output gives me 4 lines, the count is found under the line "-----" because of this I made some grep for isolating the number.&lt;BR /&gt;
&lt;BR /&gt;
Regards &lt;BR /&gt;
&lt;BR /&gt;
Michael</description>
      <pubDate>Thu, 28 Feb 2019 23:10:25 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/query-nac-database/m-p/72809#M8348</guid>
      <dc:creator>TeamNetzBetrieb</dc:creator>
      <dc:date>2019-02-28T23:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: Query NAC Database</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/query-nac-database/m-p/72810#M8349</link>
      <description>Mike,&lt;BR /&gt;
&lt;BR /&gt;
as Stephan mentioned: if you query the end-system count from a NAC appliance's DB you will need to repeat this process on all your NAC appliances. It is easier to query the total count of all end-systems from all NAC appliances from the XMC database. &lt;BR /&gt;
&lt;BR /&gt;
That said, we generally do not encourage customers/partners to directly query the DB. The preferred option would be to query end-system (and other) data via the API. If you have XMC v8.2 a simple way would be to pull the list of all MACs and then count them yourselve through some script. To test this, use your browser to go to your XMC at (use your XMC IP)&lt;BR /&gt;
&lt;BR /&gt;
https://10.65.47.90:8443/nbi/graphiql/index.html&lt;BR /&gt;
&lt;BR /&gt;
On the left side insert&lt;BR /&gt;
{&lt;BR /&gt;
 accessControl{&lt;BR /&gt;
  allEndSystemMacs&lt;BR /&gt;
 }&lt;BR /&gt;
}&lt;BR /&gt;
&lt;BR /&gt;
Then click the play button above and you should see the list of all MACs on the right. &lt;BR /&gt;
&lt;BR /&gt;
Kurt</description>
      <pubDate>Fri, 01 Mar 2019 15:50:09 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/query-nac-database/m-p/72810#M8349</guid>
      <dc:creator>Kurt_Semba</dc:creator>
      <dc:date>2019-03-01T15:50:09Z</dc:date>
    </item>
    <item>
      <title>Re: Query NAC Database</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/query-nac-database/m-p/72811#M8350</link>
      <description>Hello Kurt,&lt;BR /&gt;
&lt;BR /&gt;
thank you for your hint regarding graphiql. That's a good possibility. But in my opinion. The best solution depends on what somebody wants do  to with the end system count.&lt;BR /&gt;
&lt;BR /&gt;
If you will see the consumed licenses it's hard to pull the end system counts time by time, because of some mac addresses do not live long depending on the timers in switches, nac and wlan.&lt;BR /&gt;
For this case the database information is much more accurate I think. Depending how accurate it must be . If 100 mac more or less it's not a problem to pull the end system macs.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Regards&lt;BR /&gt;
Stephan</description>
      <pubDate>Thu, 07 Mar 2019 13:15:51 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/query-nac-database/m-p/72811#M8350</guid>
      <dc:creator>StephanH</dc:creator>
      <dc:date>2019-03-07T13:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Query NAC Database</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/query-nac-database/m-p/72812#M8351</link>
      <description>Hi SH,&lt;BR /&gt;
&lt;BR /&gt;
thank you very much for your suggestion with the XMC databases, so I can find a very good solution for my problem:&lt;BR /&gt;
&lt;BR /&gt;
First, I have to use the database "netsight", not "netsightrpt". As table in this database I use "tam_endsystem". Here all end-systems are stored. Then I made a search for all end-systems with status "ACCEPT" on each of our nac-appliances.&lt;BR /&gt;
&lt;BR /&gt;
So, my cli command in directory /usr/local/Enterasys_Networks/NetSight/mysql/bin/mysql is:&lt;BR /&gt;
./mysql --host=localhost --user=&lt;I&gt;USER&lt;/I&gt; -p&lt;I&gt;PASSWORD&lt;/I&gt; --port=4589 --protocol=TCP netsight -e 'select COUNT(*) from tam_endsystem where nacApplianceIp = "&lt;I&gt;IP-OF-NAC-APPLIANCE&lt;/I&gt;" AND STATE = "ACCEPT";'&lt;BR /&gt;
&lt;BR /&gt;
This script I saved for every of our nac-appliances with there corresponding IP-Address.&lt;BR /&gt;
&lt;BR /&gt;
Regards and thanks,&lt;BR /&gt;
&lt;BR /&gt;
Michael</description>
      <pubDate>Wed, 20 Mar 2019 21:51:51 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-site-engine/query-nac-database/m-p/72812#M8351</guid>
      <dc:creator>TeamNetzBetrieb</dc:creator>
      <dc:date>2019-03-20T21:51:51Z</dc:date>
    </item>
  </channel>
</rss>

