CMK version: 2.1.0p28
OS version: CentOS 7 (checkmk server), CentOS 7 (monitored host)
Error message:
No error other than detecting a non-existent postgreSQL instance and alarming about MAIN not running.
Background
This server wasn’t using the agent (SNMP only) even though it was installed. While reviewing the agent updater, I noticed this and modified the host configuration to use API and Check_MK agent.
Rescan and discovery showed postgres but there is no postgreSQL service
A local investigation for this server shows it is a logstash server which has a subfolder containing patterns for grok filters with ‘postgres’ being one of the folders but otherwise no old postgreSQL processes or services disabled, etc.
We are deploying the postgreSQL plugin to all agents to allow it to detect undocumented postgresql instances.
I understand as a workaround I can exclude this single server using an ignore section rule explicitly defining this host. For the short term, I have manually disabled the services as seen in the screenshot above.
This is more to report a potential issue with the plug-in logic or to isolate what might be causing a false positive on this particular server and potential cleanup.
.
Output of “cmk --debug -vvn hostname”: (If it is a problem with checks or plugins)
Section output from Check_MK server
<<<postgres_instances>>> / Transition HostSectionParser -> HostSectionParser
<<<postgres_stat_database:sep(59)>>> / Transition HostSectionParser -> HostSectionParser
<<<postgres_version:sep(1)>>> / Transition HostSectionParser -> HostSectionParser
<<<postgres_conn_time>>> / Transition HostSectionParser -> HostSectionParser
Section output from localhost (elk01-ls01) plugins
/usr/lib/check_mk_agent/plugins/mk_postgres.py
WARNING 2023-06-16 11:39:43 __main__: Could not determine postgres user, using "postgres" as default
which: no psql in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
su: user postgres does not exist
su: user postgres does not exist
su: user postgres does not exist
su: user postgres does not exist
<<<postgres_instances>>>
[[[main]]]
<<<postgres_stat_database:sep(59)>>>
[[[main]]]
<<<postgres_version:sep(1)>>>
[[[main]]]
<<<postgres_conn_time>>>
[[[main]]]
0.002
/usr/lib/check_mk_agent/plugins/mk_postgres_2.py
WARNING 2023-06-16 11:40:01 __main__: Could not determine postgres user, using "postgres" as default
which: no psql in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
su: user postgres does not exist
su: user postgres does not exist
<<<postgres_instances>>>
[[[main]]]
su: user postgres does not exist
<<<postgres_stat_database:sep(59)>>>
[[[main]]]
su: user postgres does not exist
<<<postgres_version:sep(1)>>>
[[[main]]]
<<<postgres_conn_time>>>
[[[main]]]
0.003
Sincerely,
Scotsie