Is there a way to see which agents are disabled in...
# puppet-enterprise
v
Is there a way to see which agents are disabled in the console? They show regular green check marks in the report, which is misleading, imho
j
from what i've seen (keep in mind this is mostly PE2016.2 and older), the agents don't tell the server when they're disabled, they just stop checking in every half hour ... my first thought was to look at the list of nodes and sort by "last report", but it turns out the UI (both PE2016.2 and PE2023.8) doesn't offer a way to sort the list by date
i'm sure there's a PuppetDB query that would give you the info, and if nothing else you can sort it however you like ... however PuppetDB stops including nodes in any reports once they haven't checked in for 14 days (at least that's the case in PE2016, not sure about PE2023 yet)
one thing you could do is, look at
/etc/puppetlabs/puppet/ssl/ca/invenotry.txt
on the PE server to get a list of all agent certs ever issued, use
.../ssl/cr.pem
to exclude certs which were revoked, the remainder is a list of every active cert ... from that list, any which don't show up in the reports are "not active" ... writing a script to do this actually sounds like a fun little project that i don't have time for 😁