View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000305 | My infrastructure | General | public | 2025-07-04 16:52 | 2025-07-23 11:50 |
Reporter | dvl | Assigned To | dvl | ||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | assigned | Resolution | open | ||
Summary | 0000305: What is checking the ports_to_refresh table? | ||||
Description | Where is this coming from in the logs? statement: SELECT count(*) FROM ports_to_refresh WHERE date_added < now() - interval '1 hour'; Not found in ~/scripts or in ~/modules, didn't see it in the database-schema | ||||
Tags | No tags attached. | ||||
|
It's /usr/local/libexec/nagios-custom/check_freshports_ports_to_refresh It is a Nagios check. I wonder if that table is used any more. |
|
Commented out this line:[12:56 dvl-ingress01 dvl /usr/local/etc/nrpe.d] % grep -r ports_to_refresh * freshports-ingress.cfg:command[check_freshports_ports_to_refresh] = /usr/local/libexec/nagios-custom/check_freshports_ports_to_refresh Disabled the Nagios check for 1 week |
|
Renamed the table.[13:00 pg01 dvl ~/tmp] % psql freshports.dvl psql (18beta1) Type "help" for help. freshports.dvl=# alter table ports_to_refresh rename to delete_me_ports_to_refresh freshports.dvl-# ; ALTER TABLE freshports.dvl=# |
|
Overnight, no errors. |
|
Ansible has been updated:[12:10 ansible root /usr/local/etc/ansible] # svn rm ./roles/nrpe/files/nagios-custom/check_freshports_ports_to_refresh D roles/nrpe/files/nagios-custom/check_freshports_ports_to_refresh [12:10 ansible root /usr/local/etc/ansible] # svn ci ./roles/nrpe/files/nagios-custom/check_freshports_ports_to_refresh Remove Nagios check check_freshports_ports_to_refresh The ports_to_refresh table is no longer used. re: https://bugs.langille.org/view.php?id=305 --This line, and those below, will be ignored-- D check_freshports_ports_to_refresh File svn-commit.tmp saved Deleting roles/nrpe/files/nagios-custom/check_freshports_ports_to_refresh Committing transaction... Committed revision 2845. |
|
Nagios was updated. No hosts are watching that table now. |
|
No hosts are monitoring that any more. And like that, they went silent: [12:15 pg03 dvl ~] % sudo grep ports_to_refresh /var/log/postgresql.log | tail Jul 14 11:39:57 pg03 postgres[89017]: [9-1] 2025-07-14 11:39:57.612 UTC [89017] LOG: statement: SELECT count(*) FROM ports_to_refresh WHERE date_added < now() - interval '1 hour'; Jul 14 11:42:37 pg03 postgres[98524]: [9-1] 2025-07-14 11:42:37.980 UTC [98524] LOG: statement: SELECT count(*) FROM ports_to_refresh WHERE date_added < now() - interval '1 hour'; Jul 14 11:44:57 pg03 postgres[6900]: [9-1] 2025-07-14 11:44:57.631 UTC [6900] LOG: statement: SELECT count(*) FROM ports_to_refresh WHERE date_added < now() - interval '1 hour'; Jul 14 11:44:57 pg03 postgres[6910]: [9-1] 2025-07-14 11:44:57.638 UTC [6910] LOG: statement: SELECT count(*) FROM ports_to_refresh WHERE date_added < now() - interval '1 hour'; Jul 14 11:47:37 pg03 postgres[16434]: [9-1] 2025-07-14 11:47:37.818 UTC [16434] LOG: statement: SELECT count(*) FROM ports_to_refresh WHERE date_added < now() - interval '1 hour'; Jul 14 11:49:57 pg03 postgres[27212]: [9-1] 2025-07-14 11:49:57.365 UTC [27212] LOG: statement: SELECT count(*) FROM ports_to_refresh WHERE date_added < now() - interval '1 hour'; Jul 14 11:49:57 pg03 postgres[27249]: [9-1] 2025-07-14 11:49:57.388 UTC [27249] LOG: statement: SELECT count(*) FROM ports_to_refresh WHERE date_added < now() - interval '1 hour'; Jul 14 11:52:37 pg03 postgres[39579]: [9-1] 2025-07-14 11:52:37.479 UTC [39579] LOG: statement: SELECT count(*) FROM ports_to_refresh WHERE date_added < now() - interval '1 hour'; Jul 14 11:54:57 pg03 postgres[50234]: [9-1] 2025-07-14 11:54:57.670 UTC [50234] LOG: statement: SELECT count(*) FROM ports_to_refresh WHERE date_added < now() - interval '1 hour'; Jul 14 11:54:57 pg03 postgres[50412]: [9-1] 2025-07-14 11:54:57.744 UTC [50412] LOG: statement: SELECT count(*) FROM ports_to_refresh WHERE date_added < now() - interval '1 hour'; |
|
Still to do: remove that table from the databases, DDL, code? Interesting to read that table was added in 2021 - so recent: [12:18 pg03 dvl ~/src] % grep -r ports_to_refresh * freshports/database-schema/updates-2021-08-24-ports-to-refresh.ddl:-- Table: public.ports_to_refresh freshports/database-schema/updates-2021-08-24-ports-to-refresh.ddl:-- DROP TABLE public.ports_to_refresh; freshports/database-schema/updates-2021-08-24-ports-to-refresh.ddl:CREATE TABLE IF NOT EXISTS public.ports_to_refresh freshports/database-schema/updates-2021-08-24-ports-to-refresh.ddl: CONSTRAINT ports_to_refresh_port_id_pk PRIMARY KEY (port_id), freshports/database-schema/updates-2021-08-24-ports-to-refresh.ddl: CONSTRAINT ports_to_refresh_port_id_fk FOREIGN KEY (port_id) freshports/database-schema/updates-2021-08-24-ports-to-refresh.ddl:ALTER TABLE public.ports_to_refresh ... |
|
Deleted from all tables. Next up for removal: daily_refreshes freshports.org=> select count(*) from daily_refreshes; count ------- 8112 (1 row) freshports.org=> select * from daily_refreshes order by 1 desc; refresh_date -------------- 2025-07-23 2025-07-22 2025-07-21 2025-07-20 2025-07-19 2025-07-18 2025-07-17 ... |
Date Modified | Username | Field | Change |
---|---|---|---|
2025-07-04 16:52 | dvl | New Issue | |
2025-07-04 16:52 | dvl | Status | new => assigned |
2025-07-04 16:52 | dvl | Assigned To | => dvl |
2025-07-06 12:59 | dvl | Note Added: 0000386 | |
2025-07-06 13:13 | dvl | Note Added: 0000387 | |
2025-07-06 13:14 | dvl | Note Added: 0000388 | |
2025-07-08 11:32 | dvl | Note Added: 0000389 | |
2025-07-14 12:14 | dvl | Note Added: 0000390 | |
2025-07-14 12:15 | dvl | Note Added: 0000391 | |
2025-07-14 12:17 | dvl | Note Added: 0000392 | |
2025-07-14 12:19 | dvl | Note Added: 0000393 | |
2025-07-23 11:50 | dvl | Note Added: 0000394 |