Wireless Access

Reply
New Contributor
Posts: 4
Registered: ‎12-12-2012

Reading in the results of device polling into Postgres.

Hi All,

 

In the log file /var/log/pgsql, I'm seeing the following entries:

 

Dec 20 11:55:30 airwave01 postgres[1570]: [8701-1] LOG:  00000: duration: 59978.305 ms  statement: COPY device_event (source_device_id,ap_id,client_mac,severity,facility,category,type,message) FROM STDIN WITH CSV

 

I'm assuming this is writing the results of polling to the Postgres DB so that AirWave can use it for presentation & reporting purposes.

 

The part I'm interested in is the FROM STDIN WITH CSV. Is this actually reading in a local CSV file into Postgres? If so, where can these CSV files be found?

 

Regards,

 

RT

 

 

Moderator
Posts: 1,270
Registered: ‎10-16-2008

Re: Reading in the results of device polling into Postgres.

The STDIN WITH CSV is writing the data from the memory cache into the database.  When data first comes into AMP, it's stored in memory and then written to the database.  The time difference between the 2 actions is negligible, several features including quick search make use of the entries in memory before they reach the database.

 

Are you looking for database dumps in CSV format?  If so, it's suggested that you not try to view the data that's stored in memory, but utilized the database.  The command 'dbcsv' can output a database table in CSV format.

 

Example:

# dbcsv 'select * from ap' >> /tmp/ap_table_dump.csv


Rob Gin
Senior QA Engineer - Network Services
Aruba Networks, a Hewlett Packard Enterprise Company
Search Airheads
Showing results for 
Search instead for 
Did you mean: