Finding Zero Graph Hosts in Cacti

Sometimes when we do all this nice trimming of graphs/etc we trim a host down to having NO graphs at all.  these need to be looked at (either remove the host or add some interfaces to be graphed).

Here’s some SQL that will give a list of hosts that don’t have any graphs:

SELECT id, description, hostname, notes
FROM host
WHERE host.id NOT IN (
SELECT host_id
FROM graph_local
WHERE host.id = graph_local.host_id)

Leave a Reply

Your email address will not be published.