Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jenkins input plugin not url encoding job names resulting in 404s #7165

Closed
perzizzle opened this issue Mar 12, 2020 · 3 comments · Fixed by #7211
Closed

Jenkins input plugin not url encoding job names resulting in 404s #7165

perzizzle opened this issue Mar 12, 2020 · 3 comments · Fixed by #7211
Labels
bug unexpected problem or unintended behavior
Milestone

Comments

@perzizzle
Copy link

Relevant telegraf.conf:

[[inputs.jenkins]]
  name_prefix="infra_"
  url = "http://localhost:8080"

  response_timeout = "5s"

System info:

telegraf --version
Telegraf 1.13.0 (git: HEAD 773e4ca)

Steps to reproduce:

  1. Create a Jenkins job with spaces
> telegraf --config jenkins.conf --test
infra_jenkins_job,host=jenkinsMaster,name=name,parents=parent,result=FAILURE duration=106285i,result_code=1i 1583529206000000000
2020-03-06T21:21:56Z E! [inputs.jenkins] Error in plugin: [/job/foo bar/job/application - job/feature%2branch/api/json] 404 Not Found

Expected behavior:

We successfully pull job data for every job that doesn't include spaces, if you copy the uri (/job/foo bar/job/application - job/feature%2branch/api/json) into a browser it correctly changes the spaces to %20 and the json blob is returned.

Actual behavior:

We get a 404 for jobs that contain spaces.

Additional info:

@danielnelson danielnelson added bug unexpected problem or unintended behavior ready labels Mar 12, 2020
@jgibbarduk
Copy link

I have the same issue. Please can someone take a look? Thanks

@jgibbarduk
Copy link

Any update on this?

@HarshitOnGitHub
Copy link
Contributor

Picking up this! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants