You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
About MAILER ERROR issue, would you see whether there are another general logs that mail sender or recipient weren’t configured. If you wouldn’t like to send email report, please disable it, or configure the necessary parameters.
Another PHP WARNING, I also meet the same frequently, because there are some network issues (like network down suddenly or high bandwidth usage) or target device high cpu performance. I will fix this soon.
You mean these? 2026/01/23 04:39:00 - SYSTEM WARNING: Primary Admin account notifications disabled! Unable to send administrative Email.
I have now configured the report email.
What version of Mactrack are you using?
I'm using Version 4.8 and my pull request is under the 4.8
I tried to show the most IP address's site (197 IPs), it need 3.857 sec
MariaDB [cacti]> SELECT site_name, device_id, device_name, hostname, mtp.mac_address, vendor_name, ip_address, dns_hostname, port_number, port_name, vlan_id, vlan_name, MAX( scan_date) AS scan_date, mtm.mac_id FROM mac_track_ports AS mtp LEFT JOIN mac_track_sites AS mts ON mtp.site_id = mts.site_id LEFT JOIN mac_track_macauth AS mtm ON mtm.mac_a ddress = mtp.mac_address LEFT JOIN mac_track_oui_database AS mtod ON mtod.vendor_mac = mtp.vendor_mac WHERE mtp.site_id = 202 GROUP BY device_id, mtp.mac_address, port_numbe r, ip_address ORDER BY site_name ASC LIMIT 0,100;
100 rows in set (3.857 sec)
site with 190 IP's = 100 rows in set (16.976 sec)
site with 478 IP's = 100 rows in set (31.164 sec)
site with 16,343 IP's = 100 rows in set (2 min 25.433 sec)
SHOW CREATE TABLE mac_track_ports;
SHOW CREATE TABLE mac_track_ips;
They should be partitioned to ensure they can be dropped as they age out over having to delete and then constantly have to optimize those tables over time.
I reviewed the screenshot jdcoats posted. I think it will scan all mac_track_ports for the result when the filter of scan date is ‘Most Recent’ and only ‘Site Name’. It seems it will spend much time for long period data.
I have some suggestions:
The table with long period or bulk data should be patitioed.
Delete the age out data daily (mac_track_ports, mac_track_ips, mac_track_aggregated_ports)
In the ‘View Mac’ tab, scan date ‘Most Recent’ read data from mac_track_aggregated_ports. I wrote a script to display one site’s ’recent’ or ‘today’ data. Maybe it can be used in MacTrack web ui.
Add a new filter ‘timespan’ (From ‘date’ To ‘date) to read data from mac_track_ports. But it will still spend much time to query because MacTrack poller collect and write data every interval.
This is my script to list 'Most Recent' data that I expected:
SELECT ip_address,t1.mac_address,hostname,port_number,port_name,vlan_id,date_last
FROM mac_track_aggregated_ports t1
WHERE site_id={site_id}
AND ip_address <> ''
AND date_last=(
SELECT MAX(t2.date_last)
FROM mac_track_aggregated_ports t2
WHERE t1.ip_address=t2.ip_address
)
ORDER BY inet_aton(ip_address)
Proposed partition lifecycle, following the outline above: daily partitions with tomorrow's always created in advance, and old ones dropped at midnight using the Syslog plugin's partition code.
flowchart TD
upg["Plugin upgrade"] --> isp{"mac_track_ips already<br/>partitioned by day?"}
isp -- "No" --> conv["Rebuild as daily partitions,<br/>keeping existing rows"]
isp -- "Yes" --> run
conv --> run
run["First poller run after midnight"] --> tom{"Partition for<br/>tomorrow exists?"}
tom -- "No" --> mk["Create tomorrow's partition"]
tom -- "Yes" --> old
mk --> old{"Partitions older than<br/>the retention setting?"}
old -- "Yes" --> drop["Drop them"]
old -- "No" --> done["Done"]
drop --> done
Loading
The location history and alert proposals in #414 read from this table, so they wait for this change.
The Undefined array key warning from build_InterfacesTable() in the original report was fixed by #271, which guards the $ifOperStatus[$ifIndex] lookups. This issue stays open for the mac_track_ips partitioning work above.
Activity
xxconn commentedon Jan 23, 2026
@jdcoats
About
MAILER ERRORissue, would you see whether there are another general logs that mail sender or recipient weren’t configured. If you wouldn’t like to send email report, please disable it, or configure the necessary parameters.Another
PHP WARNING, I also meet the same frequently, because there are some network issues (like network down suddenly or high bandwidth usage) or target device high cpu performance. I will fix this soon.jdcoats commentedon Jan 23, 2026
You mean these?
2026/01/23 04:39:00 - SYSTEM WARNING: Primary Admin account notifications disabled! Unable to send administrative Email.I have now configured the report email.
jdcoats commentedon Jan 23, 2026
Also notice that I cannot authorize macs. No matter if i select 1 or 1000 it never authorizes them and does not give an error or debug message
xxconn commentedon Jan 23, 2026
Could you post the screenshot of the ‘View MACs’ tab?
jdcoats commentedon Jan 25, 2026
i cant get anything to show anymore after subsequent runs, I think i have to roll back.
jdcoats commentedon Jan 25, 2026
queries got very slow hung up cacti and dont provide data
jdcoats commentedon Jan 25, 2026
finally got a page to load
xxconn commentedon Jan 26, 2026
What version of Mactrack are you using?
I'm using Version 4.8 and my pull request is under the 4.8
I tried to show the most IP address's site (197 IPs), it need 3.857 sec
MariaDB [cacti]> SELECT site_name, device_id, device_name, hostname, mtp.mac_address, vendor_name, ip_address, dns_hostname, port_number, port_name, vlan_id, vlan_name, MAX( scan_date) AS scan_date, mtm.mac_id FROM mac_track_ports AS mtp LEFT JOIN mac_track_sites AS mts ON mtp.site_id = mts.site_id LEFT JOIN mac_track_macauth AS mtm ON mtm.mac_a ddress = mtp.mac_address LEFT JOIN mac_track_oui_database AS mtod ON mtod.vendor_mac = mtp.vendor_mac WHERE mtp.site_id = 202 GROUP BY device_id, mtp.mac_address, port_numbe r, ip_address ORDER BY
site_nameASC LIMIT 0,100;100 rows in set (3.857 sec)
jdcoats commentedon Jan 26, 2026
your PR's are all going into develop which is 4.9
site with 190 IP's = 100 rows in set (16.976 sec)
site with 478 IP's = 100 rows in set (31.164 sec)
site with 16,343 IP's = 100 rows in set (2 min 25.433 sec)
xxconn commentedon Jan 26, 2026
Could you tell me which version you rolled back? I just want to check what different about the SQL query statements with 4.9.
jdcoats commentedon Jan 26, 2026
i didn't roll anything back, I'm still running current Develop 4.9
jdcoats commentedon Jan 26, 2026
maybe my 8month data retention is to much?
TheWitness commentedon Jan 26, 2026
They should be partitioned to ensure they can be dropped as they age out over having to delete and then constantly have to optimize those tables over time.
@xxconn, something to put on the list.
TheWitness commentedon Jan 26, 2026
Then, apply a time range on the IP query to read from only a single or maybe just two partitions.
jdcoats commentedon Jan 26, 2026
TheWitness commentedon Jan 26, 2026
Okay, making them partitioned could take a while to 'reorganize' the data. I'll leave that to @xxconn if he's able.
xxconn commentedon Jan 26, 2026
@TheWitness
I'm not sure what that you said means. ‘Reorganized’ ?
TheWitness commentedon Jan 26, 2026
ALTER TABLE REORGANIZE...xxconn commentedon Jan 27, 2026
I reviewed the screenshot jdcoats posted. I think it will scan all mac_track_ports for the result when the filter of scan date is ‘Most Recent’ and only ‘Site Name’. It seems it will spend much time for long period data.
I have some suggestions:
xxconn commentedon Jan 27, 2026
This is my script to list 'Most Recent' data that I expected:
SELECT ip_address,t1.mac_address,hostname,port_number,port_name,vlan_id,date_last
FROM mac_track_aggregated_ports t1
WHERE site_id={site_id}
AND ip_address <> ''
AND date_last=(
SELECT MAX(t2.date_last)
FROM mac_track_aggregated_ports t2
WHERE t1.ip_address=t2.ip_address
)
ORDER BY inet_aton(ip_address)
xxconn commentedon Jan 27, 2026
This is the info of my site.
MariaDB [cacti]> SELECT
-> TABLE_NAME AS
Table,-> ROUND(((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024), 2) AS
Size (MB)-> FROM
-> information_schema.TABLES
-> WHERE
-> TABLE_SCHEMA = 'cacti'
-> AND
-> TABLE_NAME = 'mac_track_ips';
+---------------+-----------+
| Table | Size (MB) |
+---------------+-----------+
| mac_track_ips | 3739.04 |
+---------------+-----------+
1 row in set (0.000 sec)
MariaDB [cacti]> SELECT
-> TABLE_NAME AS
Table,-> ROUND(((DATA_LENGTH + INDEX_LENGTH) / 1024 / 1024), 2) AS
Size (MB)-> FROM
-> information_schema.TABLES
-> WHERE
-> TABLE_SCHEMA = 'cacti'
-> AND
-> TABLE_NAME = 'mac_track_ports';
+-----------------+-----------+
| Table | Size (MB) |
+-----------------+-----------+
| mac_track_ports | 8286.14 |
+-----------------+-----------+
1 row in set (0.000 sec)
| mac_track_ports | CREATE TABLE
mac_track_ports(site_idint(10) unsigned NOT NULL DEFAULT 0,device_idint(10) unsigned NOT NULL DEFAULT 0,hostnamevarchar(40) NOT NULL DEFAULT '',device_namevarchar(100) NOT NULL DEFAULT '',vlan_idvarchar(5) NOT NULL DEFAULT 'N/A',vlan_namevarchar(50) NOT NULL DEFAULT '',mac_addressvarchar(20) NOT NULL DEFAULT '',vendor_macvarchar(8) DEFAULT NULL,ip_addressvarchar(20) NOT NULL DEFAULT '',dns_hostnamevarchar(200) DEFAULT '',port_numbervarchar(30) NOT NULL DEFAULT '',port_namevarchar(50) NOT NULL DEFAULT '',scan_datedatetime NOT NULL DEFAULT '0000-00-00 00:00:00',authorizedtinyint(3) unsigned NOT NULL DEFAULT 0,PRIMARY KEY (
port_number,scan_date,mac_address,device_id),KEY
site_id(site_id),KEY
scan_date(scan_date) USING BTREE,KEY
description(device_name),KEY
mac(mac_address),KEY
hostname(hostname),KEY
vlan_name(vlan_name),KEY
vlan_id(vlan_id),KEY
device_id(device_id),KEY
ip_address(ip_address),KEY
port_name(port_name),KEY
dns_hostname(dns_hostname),KEY
vendor_mac(vendor_mac),KEY
authorized(authorized),KEY
site_id_device_id(site_id,device_id)) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='Database for Tracking Device MACs'
PARTITION BY RANGE (to_days(
scan_date))(PARTITION
d20251228VALUES LESS THAN (739979) ENGINE = MyISAM,PARTITION
d20251229VALUES LESS THAN (739980) ENGINE = MyISAM,PARTITION
d20251230VALUES LESS THAN (739981) ENGINE = MyISAM,PARTITION
d20251231VALUES LESS THAN (739982) ENGINE = MyISAM,PARTITION
d20260101VALUES LESS THAN (739983) ENGINE = MyISAM,PARTITION
d20260102VALUES LESS THAN (739984) ENGINE = MyISAM,PARTITION
d20260103VALUES LESS THAN (739985) ENGINE = MyISAM,PARTITION
d20260104VALUES LESS THAN (739986) ENGINE = MyISAM,PARTITION
d20260105VALUES LESS THAN (739987) ENGINE = MyISAM,PARTITION
d20260106VALUES LESS THAN (739988) ENGINE = MyISAM,PARTITION
d20260107VALUES LESS THAN (739989) ENGINE = MyISAM,PARTITION
d20260108VALUES LESS THAN (739990) ENGINE = MyISAM,PARTITION
d20260109VALUES LESS THAN (739991) ENGINE = MyISAM,PARTITION
d20260110VALUES LESS THAN (739992) ENGINE = MyISAM,PARTITION
d20260111VALUES LESS THAN (739993) ENGINE = MyISAM,PARTITION
d20260112VALUES LESS THAN (739994) ENGINE = MyISAM,PARTITION
d20260113VALUES LESS THAN (739995) ENGINE = MyISAM,PARTITION
d20260114VALUES LESS THAN (739996) ENGINE = MyISAM,PARTITION
d20260115VALUES LESS THAN (739997) ENGINE = MyISAM,PARTITION
d20260116VALUES LESS THAN (739998) ENGINE = MyISAM,PARTITION
d20260117VALUES LESS THAN (739999) ENGINE = MyISAM,PARTITION
d20260118VALUES LESS THAN (740000) ENGINE = MyISAM,PARTITION
d20260119VALUES LESS THAN (740001) ENGINE = MyISAM,PARTITION
d20260120VALUES LESS THAN (740002) ENGINE = MyISAM,PARTITION
d20260121VALUES LESS THAN (740003) ENGINE = MyISAM,PARTITION
d20260122VALUES LESS THAN (740004) ENGINE = MyISAM,PARTITION
d20260123VALUES LESS THAN (740005) ENGINE = MyISAM,PARTITION
d20260124VALUES LESS THAN (740006) ENGINE = MyISAM,PARTITION
d20260125VALUES LESS THAN (740007) ENGINE = MyISAM,PARTITION
d20260126VALUES LESS THAN (740008) ENGINE = MyISAM,PARTITION
dMaxValueVALUES LESS THAN MAXVALUE ENGINE = MyISAM) || mac_track_ips | CREATE TABLE
mac_track_ips(site_idint(10) unsigned NOT NULL DEFAULT 0,device_idint(10) unsigned NOT NULL DEFAULT 0,hostnamevarchar(40) NOT NULL DEFAULT '',device_namevarchar(100) NOT NULL DEFAULT '',port_numbervarchar(10) NOT NULL DEFAULT '',mac_addressvarchar(20) NOT NULL DEFAULT '',ip_addressvarchar(20) NOT NULL DEFAULT '',dns_hostnamevarchar(200) DEFAULT '',scan_datedatetime NOT NULL DEFAULT '0000-00-00 00:00:00',PRIMARY KEY (
scan_date,ip_address,mac_address,site_id),KEY
ip(ip_address),KEY
port_number(port_number),KEY
mac(mac_address),KEY
device_id(device_id),KEY
site_id(site_id),KEY
hostname(hostname),KEY
scan_date(scan_date)) ENGINE=MyISAM DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci |
The retentation of the table
mac_track_portsis 30 days.The retentation of the table
mac_track_ipsis 7 days.FYI
TheWitness commentedon Jan 27, 2026
Note, from a code perspective:.
somethingwithproof commentedon Nov 9, 2026
The location history and alert proposals in #414 depend on this partitioning work landing first.
somethingwithproof commentedon Nov 9, 2026
Proposed partition lifecycle, following the outline above: daily partitions with tomorrow's always created in advance, and old ones dropped at midnight using the Syslog plugin's partition code.
flowchart TD upg["Plugin upgrade"] --> isp{"mac_track_ips already<br/>partitioned by day?"} isp -- "No" --> conv["Rebuild as daily partitions,<br/>keeping existing rows"] isp -- "Yes" --> run conv --> run run["First poller run after midnight"] --> tom{"Partition for<br/>tomorrow exists?"} tom -- "No" --> mk["Create tomorrow's partition"] tom -- "Yes" --> old mk --> old{"Partitions older than<br/>the retention setting?"} old -- "Yes" --> drop["Drop them"] old -- "No" --> done["Done"] drop --> doneThe location history and alert proposals in #414 read from this table, so they wait for this change.
somethingwithproof commentedon Nov 12, 2026
The
Undefined array keywarning frombuild_InterfacesTable()in the original report was fixed by #271, which guards the$ifOperStatus[$ifIndex]lookups. This issue stays open for themac_track_ipspartitioning work above.