signalfx / collectd-jenkins

collectd based plugin for Jenkins
Apache License 2.0
2 stars 16 forks source link

No metrics for jobs in folders #29

Open spiarh opened 3 years ago

spiarh commented 3 years ago

Description

We are using signalfx-agent to monitor our Jenkins and only the top-level jobs are showing up in SignalFX, not the ones into folders. FWIU, this was supposed to be fixed after reading #21

Issue

We have jobs with spaces and the URL of the jobs within the folders are double encoded.

For example here, the project name is: APP Registry/manager - Deploy and %20 is re-encoded to %2520.

Jun 08 11:18:15 jenkins.example.com signalfx-agent[3951]: time="2021-06-08T11:18:15Z" level=error msg="Error making API call (404 Client Error: Not Found for url: https://jenkins.example.com:443/job/APP%2520Registry/job/manager%2520-%2520Rollout/api/json/) https://jenkins.example.com:443/job/APP%2520Registry/job/manager%2520-%2520Rollout/api/json/" createdTime=1.6231510959370975e+09 lineno=115 logger=root monitorID=1 monitorType=collectd/jenkins runnerPID=3992 sourcePath=/usr/lib/signalfx-agent/collectd-python/jenkins/jenkins.py Jun 08 11:18:15 jenkins.example.com signalfx-agent[3951]: time="2021-06-08T11:18:15Z" level=error msg="Unable to get data from https://jenkins.example.com:443/job/APP%20Registry/job/manager%20-%20Rollout/api/json/ for jenkins" createdTime=1.6231510959371967e+09 lineno=496 logger=root monitorID=1 monitorType=collectd/jenkins runnerPID=3992 sourcePath=/usr/lib/signalfx-agent/collectd-python/jenkins/jenkins.py

Jun 08 11:18:16 jenkins.example.com signalfx-agent[3951]: time="2021-06-08T11:18:16Z" level=error msg="Error making API call (404 Client Error: Not Found for url: https://jenkins.example.com:443/job/APP%2520Registry/job/manager%2520-%2520Deploy/api/json/) https://jenkins.example.com:443/job/APP%2520Registry/job/manager%2520-%2520Deploy/api/json/" createdTime=1.623151096661992e+09 lineno=115 logger=root monitorID=1 monitorType=collectd/jenkins runnerPID=3992 sourcePath=/usr/lib/signalfx-agent/collectd-python/jenkins/jenkins.py Jun 08 11:18:16 jenkins.example.com signalfx-agent[3951]: time="2021-06-08T11:18:16Z" level=error msg="Unable to get data from https://jenkins.example.com:443/job/APP%20Registry/job/manager%20-%20Deploy/api/json/ for jenkins" createdTime=1.6231510966621022e+09 lineno=496 logger=root monitorID=1 monitorType=collectd/jenkins runnerPID=3992 sourcePath=/usr/lib/signalfx-agent/collectd-python/jenkins/jenkins.py

--> After doing an ugly hack to replace back %2520 to %20 :innocent: , the error is gone but the jobs are still not showing up in SignalFX

Thanks for you help !

RogerWatkins-Anaplan commented 3 years ago

I am also experiencing this issue - given all of our jobs are in folders this means we are losing half of the data coming from this collector.