# Important! Do not change this if you don't know what you're doing.
# Fields are:
# type: 	decides what catid to match on in netbox
# interface:	set to 1 if we are gathering if-data
# giga:         set to 1 if this is giga-interfaces
# table:	what table to gather data from
# name:		what field(s) to use as name, may specify join-char with the join-parameter
# join:		specify how to join name-fields if more than one
# descr:	a complete sql-sentence to fetch info from the database. It might be wise to ensure that
#		the values you ask for exists...
type = GW,GSW
interface = 1
name = interface
descr = SELECT nettype, netident, description, type.descr, room.locationid, room.roomid, room.descr FROM gwport LEFT JOIN module USING (moduleid) LEFT JOIN netbox USING (netboxid) LEFT JOIN type USING (typeid) LEFT JOIN room USING (roomid) LEFT JOIN gwportprefix USING (gwportid) LEFT JOIN prefix ON (prefix.prefixid=gwportprefix.prefixid) LEFT JOIN vlan USING (vlanid) WHERE gwportid=$id AND vlan > 1 ORDER BY vlan DESC limit 1
table = gwport
