Files
Cactidocumentation/Plugin-Mactrack.md
T
Thomas Vincent 741ad51355 docs: [1.2.x] refresh the front page, correct grammar and Markdown, and align plugin pages with their READMEs (#273)
* docs: [1.2.x] refresh the manual front page

The front page opened with version notes before saying what Cacti is,
used headings as sentences in the credits, and its table of contents
listed seven sections while the page has ten.

Open with a short description and a getting-started sequence, link the
website and forums, give the credits real headings, and list every
section in the table of contents in page order. Record Jeff Pasnak
under In Memoriam with a link to the 1.2.31 release announcement.
Correct label typos and wrap long entries with reference links.

Existing section anchors are unchanged, and every page is still linked.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs: [1.2.x] fix typos, unrendered headings and forum links

A check of every page linked from the front page found misspellings in
eleven pages, three Mactrack headings written without a space after the
hashes, which render as plain text, and two forum links still using
http.

Correct the spellings, add the missing space so the headings render,
and point the forum links at https, where they already redirect.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs: [1.2.x] align the plugin pages with the plugin READMEs

The supported plugins list and the Syslog and Mactrack pages had drifted
from the README and INFO files in the plugin repositories.

Update the descriptions that the READMEs contradict: Monitor's Thold
requirement, the Router Configs transfer methods, the ReportIt release
and Cacti versions, the WMI collection methods and its development
status, and NUT support in Apcupsd. Add the Syslog requirements, the
upgrade procedure, the dedicated database settings and the remote
collector settings, and correct the database grant and a misplaced
code fence. Add the Mactrack requirements and a short section on
history partitioning and ignored ports that links to the README.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs: [1.2.x] correct grammar, spelling and broken Markdown

A read of every page linked from the front page found grammar and
spelling errors throughout, and Markdown that does not render as
intended.

Correct grammar, spelling, punctuation and product-name capitalization
in 95 pages without changing headings, code blocks, link targets or
the meaning of the text. Repair the Markdown defects: a code fence in
the SSH tunnel how-to that never closed, malformed bold markers in the
user management and device defaults pages, a release notes table with
no blank line before it, split rows in the tree sorting table, and
LDAP list items missing their markers. Correct three interface labels
quoted with typos.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

* docs: [1.2.x] correct statements that differ from the 1.2.x source

Reviewers of the linked pages flagged statements that looked wrong.
Each was compared with the Cacti 1.2.x source at 1523aa04b, and only
those the source or the page itself settles are changed.

Correct interface labels and option names (Index Count Changed,
Permissive, Not Selected, Utilities, the BCC description, the gear
icon for plugin install), the default Maximum Value of U for a new
data source item, the sysDescr object name, the PHP floor wording in
the requirements table, the Mactrack wildcard character and the
snmptrapd -On option. Repair cross-references, example values that
disagree with their commands, two table captions, a split list and
several sentences with missing words.

Statements the source does not settle are left as written.

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>

---------

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
2026-11-24 00:58:06 -08:00

6.9 KiB

MacTrack

The MacTrack plugin is designed to scan network switches, routers and intelligent hubs for connected devices, and record their location either based upon the port name or alias of the switch or hub. It also attempts to discover the IP address of the MAC address from the routers included in the MacTrack database. MacTrack can also use arpwatch to gather IP to MAC address associations.

MacTrack has the ability to also notify admins or security personnel when the MAC address of a missing or stolen computer re-appears on the network. This can be helpful in recovering lost equipment. Through MacTrack's interface monitoring feature, a Network Administrator can get a very good idea of where utilization is, where there are errors, etc. within their network.

MacTrack requires Cacti 1.2.29 or later and PHP 8.2.

This how-to refers to the menu item "Mactrack" or "Mactrack tab". In older versions it is called "Device tracking".

Mactrack setup

  • Check default settings Configuration -> Settings -> Mactrack tab (or Device tracking in older version)

  • Create sites (mandatory) At this moment Mactrack's sites have no relation to Cacti's sites

  • Define Device Types (mandatory) Several device types are provided as an example with the current version. Devices without a device type match will not be processed

  • Import IEEE OUI Database (optional) Define SNMP set options to use

Create site

One of the mandatory steps to start setting Mactrack up is to create sites where we are going to allocate our Mactrack devices. Console -> Mactrack -> Sites You need add devices to site. You can import some existing Cacti devices into Mactrack or add devices manually on Console -> Mactrack -> Devices

Device types

Device Types

Console -> Mactrack (Device Tracking in previous versions) -> Device Types menu

Create as many device types as you need, following these instructions. Description - give this device type a meaningful description Vendor - fill in the name for the vendor of this device type Device Type - choose the type of device. What kind of device is it? Meaning that some scanning functions will be available for some of these types only. E.g., if you set a switch/hub as "Switch/Router" you will then be able to pick an IP scanning function up when the device doesn't really support it. System Description Match - provide key information to help Device Tracking detect the type of device. The wildcard character is the * sign. When you open a device in Cacti, you normally see the following on top of the page. System: Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(53)SE2, RELEASE SOFTWARE (fc3)Technical Support: http://www.cisco.com/techsupportCopyright (c) 1986-2010 by Cisco Systems, Inc.Compiled Wed 21-Apr-10 05:52 by prod_rel_team Uptime: 3176562306 Hostname: myswitch101.com ObjectID: .1.3.6.1.4.1.9.1.696 What you want to make Mactrack look at is something like "C2960" which quickly identify the hardware platform. Don't waste your time trying to match something different or more complex like "12.2(53)SE2".

Vendor SNMP Object ID Match - this is the SNMP OID on this format: .1.3.6.1.4.1.9.1.696 MAC Address Scanning Function - we assume you know what you are looking for here. This function should only be set to switches L2/L3 and not Routers. IP Address Scanning Function - this function allows you to look at the ARP table and map IP vs MAC. There is a special function for Cisco devices called get_cisco_dhcpsnooping_table that will look at the DHCP Snooping table for switches if enabled. 802.1x Scanning Function - this scanning function was introduced in version 4.2 and is only for Cisco devices. Serial Number Base OID - this isn't mandatory but you can specify the SNMP OID to find the serial number to the device. Serial Number Collection Method - how is the serial number collected for this OID. If 'SNMP Walk', we assume multiple serial numbers. If 'Get', it will be only one. Low User Port Number - provide the low user port number on this switch. Leave 0 to allow the system to calculate it. Empty assumes 0 High User Port Number - provide the high user port number on this switch. Leave 0 to allow the system to calculate it. Empty assumes 0

The export device types option allows you to export the existing device types to CSV format so you can later import them onto new installations, share them, or just back them up. Go to Console -> Mactrack -> Device Types and click the export button. To import Device Types, use the "Import" button on the same page.

Import OUI Database from IEEE

This function will download and install the latest OUI database from the IEEE website. Each Network Interface Card (NIC) has a MAC Address. The MAC Address can be broken into two parts. The first part of the MAC Address contains the Vendor MAC. The Vendor MAC identifies who has manufactured the part. This will be helpful to check for rogue devices on your network.

Go to Mactrack Tools -> Tracking Utilities and click on Refresh IEEE Vendor MAC/OUI Database

This option requires Internet access, so if for some reason your server cannot access the Internet, you can manually download the file from the OUI Database, copy it to your Cacti server, and import it by hand as follows.

Go to <cacti_path>/plugins/mactrack

Assuming that you have copied the file to /tmp [root@mycactiserver mactrack]#php mactrack_import_ouidb.php -f=/tmp/out.txt Getting OUI Database from the IEEE OUI Database Download from IEEE Complete ........................ There were '23126' Entries Added/Updated in the database. There were '0' Records Removed from the database.

History partitioning and ignored ports

MacTrack keeps its MAC address, IP address and 802.1x history in the mac_track_ports, mac_track_ips and mac_track_dot1x tables. New installs partition them by scan date where MySQL 8.0 or later, or MariaDB with partitioning, allows it; existing installs are rebuilt with cli/upgrade_partitioning.php or from the MacTrack utilities. Ports that carry many MAC addresses, such as uplinks, can be kept out of the collected data with the Ports to Ignore settings. See the README at plugin_mactrack for the partitioning procedure and the other command-line scripts.

Troubleshooting

Running poller in debug mode Go to <cacti_path>/plugins/mactrack php -q poller_mactrack.php -d -sid=1 Run php poller_mactrack.php -h for more options

Run scanner in debug mode for an specific device Go to <cacti_path>/plugins/mactrack php -q mactrack_scanner.php -d -id=23 Run php -q mactrack_scanner.php -h for more options

The scanning function you are looking for does not show up Go to Mactrack Tools -> Tracking Utilities and click on "Refresh Scanning Functions" Deletes old and potentially stale Device Tracking scanning functions from the drop-down you see when you edit a device type.

Copyright (c) 2004-2026 The Cacti Group