1

I am using xinetd to serve the output of check_mk_agent. I have custom check_mk_agent scripts, some of which are configured with environment variables. These environment variables are set in /etc/profile.d/set_env.sh. When I run check_mk_agent manually, the environment variables are found, and the custom checks succeed. When i do telnet myhost 6556, the environment variables are not found, and the custom checks fail.

My question is, what is a good way to ensure that set_env.sh gets run in the xinetd context? I would rather not use env and passenv variables in xinetd configuration, because it would be annoying to unnecessarily maintain environment variables in multiple places on the same host.

Thanks!

maxenglander
  • 3,991
  • 4
  • 30
  • 40

1 Answers1

0

Edit the file check_mk_agent file, and add the flowing line just after #!/bin/bash:

source /etc/profile.d/set_env.sh

Save this, and retry.

Jim Black
  • 1,422
  • 1
  • 13
  • 26