Jenkins plugin setup

CMK version: 2.2.0p16

I try to setup a connection to the jenkins server

Other integrations > Applications
Jenkins jobs and builds

jenkins_setup

After that I run a service discovery and detect an empty jenkins queue and unkown jenkins instance

image

What am I missing? Is there somewhere someting like a documentation?

The special agent agent_jenkins currently can only handle jenkins installation on the root URI path.

For the needed permissions there is an KB article

1 Like

I know this post is somewhat old, but I encountered the same problem when trying to monitor my Jenkins instance under a different path from ROOT. So, I decided to take a look at the Jenkins special agent, “agents_jenkins.py,” and I noticed that when constructing the base URL, it was being done like this:

python

Copiar cĂłdigo

url_base = f"{args.proto}://{args.hostname}:{args.port}"

I modified it to look like this:

python

Copiar cĂłdigo

hostname = args.hostname.split("/")[0]
path = args.hostname.split("/")[1] if len(args.hostname.split("/")) > 1 else ""
url_base = f"{args.proto}://{hostname}:{args.port}/{path}"

This way, you can configure the hostname as jenkins.es/jenkins, and it will retrieve the data correctly. I hope this helps.

You need to modify this in /opt/omd/versions/your_current_version/lib/python3/cmk/special_agents/agent_jenkins.py.

IMPORTANT:

  • If you update your version of check_mk, you’ll need to make this change again unless it is included in future versions of check_mk.

From 2.4.0b1 on this will be configurable

Until then you can also try to overshadow the special agent in the ~/local structure

https://checkmk.atlassian.net/wiki/spaces/KB/pages/9470877/How-to+get+a+local+copy+of+a+special+agent

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed. Contact an admin if you think this should be re-opened.