Check_mk_agent loop execution

Hi @whity

As I said in one of my earlier posts, and as Andreas correctly stated: The setting for the
agent is most likely unnecessary. Sorry for the misleading advice. In any case, here’s a
“quick and dirty test” on one of my AIX hosts that has has oslevel 7100-02-02-1316
(but that’s irrelevant… just for completeness).

I’m logged on as unprivileged, normal user thomas and am in /home/thomas

  • CMK agent check_mk_agent.aix is in /home/thomas/bin and of course made executable with chmod +x

  • CMK directories created under aforementioned homedir, e.g.: mkdir -p {lib/local,lib/plugins,etc,var/spool}

  • Relevant variables exported as follows:

export MK_LIBDIR=/home/thomas/lib
export MK_CONFDIR=/home/thomas/etc
export MK_VARDIR=/home/thomas/var

  • mk_oracle plugin copied to /home/thomas/lib/plugins and made it executable as well with chmod +x

  • “stock” mk_oracle.cfg copied to /home/thomas/etc

  • Also copied a tnsnames.ora and a sqlnet.ora my DBAs gave me into /home/thomas/etc

With all that in place, let’s give it a shot:

  • cd bin and ./check_mk_agent.aix

<<<oracle_instance>>>
<<<oracle_sessions>>>
<<<oracle_logswitches>>>
<<<oracle_undostat>>>
<<<oracle_recovery_area>>>
<<<oracle_processes>>>
<<<oracle_recovery_status>>>
<<<oracle_longactivesessions>>>
<<<oracle_dataguard_stats>>>
<<<oracle_performance>>>
<<<oracle_locks>>>
<<<oracle_tablespaces>>>
<<<oracle_rman>>>
<<<oracle_jobs>>>
<<<oracle_ts_quotas>>>
<<<oracle_resumable>>>
<<<oracle_instance>>>
<<<oracle_processes>>>
<<<oracle_asm_diskgroup>>>
Error Message: <DB1>|FAILURE|ERROR: ORA-01017: invalid username/password; logon denied SP2-0751: Unable to connect

Wonderful! Of course now I’d have to configure a DBUSER in
mk_oracle.cfg to really get results, but other than that:
Works just fine, even as unprivileged, normal user.
No modification of the agent itself was necessary whatsoever.

Please recheck your setup: You may be missing one
or multiple steps from above. Please also review the official
documentation of the Oracle plugin, posted above.

Notes:

  • Agent output above, intentionally truncated.
  • DB Name changed for security reasons.

HTH,
Thomas

1 Like