Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


SQL Query

 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (MAC Track)
Author Message
msw1970
Cacti User


Joined: 09 Jan 2007
Posts: 153

PostPosted: Wed Jan 16, 2008 6:30 am    Post subject: SQL Query Reply with quote

Hi

I need to write an SQL query to extract some information from MACTRACK for unauthorised mac addresses on a specific vlan. I've got as far as being able to extract only the authorized mac's on a specific VLAN but it shows me all entries for all scans. I only want to show the most recent....

Here's the current SQL statement...

SELECT mac_track_ports_0.device_name, mac_track_ports_0.vlan_id, mac_track_ports_0.vlan_name, mac_track_ports_0.mac_address, mac_track_ports_0.ip_address, mac_track_ports_0.dns_hostname, mac_track_ports_0.port_number, mac_track_ports_0.scan_date, mac_track_ports_0.authorized
FROM cacti_db.mac_track_ports mac_track_ports_0
WHERE (mac_track_ports_0.vlan_id='508') AND (mac_track_ports_0.authorized=1)

Anyone know how to only select the most recent as you can do from the MACTRACK tab in Cacti??
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (MAC Track) All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group