Yes, the checkipaconsistency normal output is something like this: +--------------------+----------+----------+----------+-------+ | FreeIPA servers: | host01 | host02 | host03 | STATE | +--------------------+----------+----------+----------+-------+ | Active Users | 8 | 8 | 8 | OK | | Stage Users | 0 | 0 | 0 | OK | | Preserved Users | 0 | 0 | 0 | OK | | Hosts | 68 | 68 | 68 | OK | | Services | 13 | 13 | 13 | OK | | User Groups | 75 | 75 | 75 | OK | | Host Groups | 12 | 12 | 12 | OK | | Netgroups | 11 | 11 | 11 | OK | | HBAC Rules | 34 | 34 | 34 | OK | | SUDO Rules | 23 | 23 | 23 | OK | | DNS Zones | 0 | 0 | 0 | OK | | Certificates | 27 | 27 | 27 | OK | | LDAP Conflicts | 0 | 0 | 0 | OK | | Ghost Replicas | 0 | 0 | 0 | OK | | Anonymous BIND | ON | ON | ON | OK | | Microsoft ADTrust | True | True | True | OK | | Replication Status | host02 0 | host03 0 | host02 0 | OK | | | host03 0 | host01 0 | host01 0 | | +--------------------+----------+----------+----------+-------+
However if you pass it the -n flag it looks something like this: OK - 17/17 checks passed That’s the sort of format for the summary output, or if something is wrong maybe something like: WARNING - 16/17 checks passed, 1 check warning The other part of Nagios formatted output would be the exit code, as 0 means ok, 1 is warning, 2 is critical, and 3 is unknown. So, with a flag for nagios output you would just have summary output line and exit with the correct code. I have never used python otherwise I would look to contribute this myself. I am probably not the only user who would find this useful. — Bob Jones Lead Linux Services Engineer ITS ECP - Linux Services > On Nov 11, 2019, at 10:00 AM, Alex Corcoles via FreeIPA-users > <freeipa-users@lists.fedorahosted.org> wrote: > > On Mon, Nov 11, 2019 at 3:48 PM Rob Crittenden <rcrit...@redhat.com> wrote: > Jones, Bob (rwj5d) via FreeIPA-users wrote: > > If you’re making these sorts of changes, might I suggest a flag to generate > > Nagios safe output that is just a summary of how many warnings/errors were > > found like the way checkipaconsistency does it? Otherwise we will have to > > come up with a wrapper to parse the output and create the correct output > > format. > > I don't know what you mean by "nagios-safe output". Are you suggesting a > sort of --summary option that just reports the number and types of output? > > I think the idea is to follow the Nagios plugin API: > > https://assets.nagios.com/downloads/nagioscore/docs/nagioscore/4/en/pluginapi.html > > Strictly speaking, the output of a Nagios plugin is not so important- unless > you manage to output "valid" perfdata, Nagios will chug along (maybe it will > not show pretty service status) and things will just work IFF the return code > from the process follows the Nagios standards (0: OK, 1: WARNING, 2: > CRITICAL, 3 or other: UNKNOWN). > > IMHO, if the tool provides structured output like it currently does (JSON), > writing a Nagios wrapper should be "easy" and it wouldn't be significantly > worse than implementing "Nagios"-mode within ipa-healthcheck. > > OTOH, Nagios is probably one of the most popular monitoring solutions right > now, IIRC, it's the only monitoring solution that RedHat packages in RHEL and > a lot of other monitoring solutions can use Nagios plugins, so it would be > very nice if yum install freeipa-server automatically installed a Nagios > check. > > Cheers, > > Álex > > > > -- > ___ > {~._.~} > ( Y ) > ()~*~() mail: alex at corcoles dot net > (_)-(_) http://alex.corcoles.net/ > > _______________________________________________ > FreeIPA-users mailing list -- freeipa-users@lists.fedorahosted.org > To unsubscribe send an email to freeipa-users-le...@lists.fedorahosted.org > Fedora Code of Conduct: > https://docs.fedoraproject.org/en-US/project/code-of-conduct/ > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > List Archives: > https://lists.fedorahosted.org/archives/list/freeipa-users@lists.fedorahosted.org
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ FreeIPA-users mailing list -- freeipa-users@lists.fedorahosted.org To unsubscribe send an email to freeipa-users-le...@lists.fedorahosted.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedorahosted.org/archives/list/freeipa-users@lists.fedorahosted.org