# GIT Pipelines Integration

**URL:** <https://discuss.elastic.co/t/git-pipelines-integration/101121>\
**Category:** Logstash\
**Created:** [September 20, 2017, 7:32am UTC](https://discuss.elastic.co/t/git-pipelines-integration/101121 "2017-09-20T07:32:21Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![paul1243](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@paul1243](https://discuss.elastic.co/u/paul1243)\
**Post date:** [September 20, 2017, 7:32am UTC](https://discuss.elastic.co/t/git-pipelines-integration/101121/1 "2017-09-20T07:32:22Z")

</div>

Hi -  
We are trying to integrate with GIT CI/CD with ELK , I'd like to pull the Pipelines job status and send it to Elastic Search and then display it on the dashboard. Would somone please provide your comments on this.

Thanks !

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 20, 2017, 8:24am UTC](https://discuss.elastic.co/t/git-pipelines-integration/101121/2 "2017-09-20T08:24:04Z")

</div>

Are you talking about Jenkins? When do you want to pull the status? What dashboard are you talking about?

---

<div class="post-metadata">

**Author:** ![paul1243](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@paul1243](https://discuss.elastic.co/u/paul1243)\
**Post date:** [September 20, 2017, 8:48am UTC](https://discuss.elastic.co/t/git-pipelines-integration/101121/3 "2017-09-20T08:48:00Z")

</div>

Hi @magnusbaeck,

Its for the GIT Continuous Integration ([https://about.gitlab.com/features/gitlab-ci-cd/](https://about.gitlab.com/features/gitlab-ci-cd/)).  
It has the Pipeline Jobs executing, wanted to pull the status of those jobs.  
We are using Kibana as Dashboard.

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 20, 2017, 9:35am UTC](https://discuss.elastic.co/t/git-pipelines-integration/101121/4 "2017-09-20T09:35:58Z")

</div>

Oh, Git **Lab**. I suppose you could use an http\_poller input in Logstash to periodically query for the pipeline's status.

---

<div class="post-metadata">

**Author:** ![paul1243](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@paul1243](https://discuss.elastic.co/u/paul1243)\
**Post date:** [September 21, 2017, 12:28pm UTC](https://discuss.elastic.co/t/git-pipelines-integration/101121/5 "2017-09-21T12:28:51Z")

</div>

Thanks for your reply, @magnusbaeck.

We have the authorization for the HTTP requests with the Access Token, how do I give it the request ?  
I tried with the below request, but it throws unauthorized 401 error, but with the same access token works over Ruby Rest calls.

input {  
http\_poller {  
urls =\> {  
test2 =\> {

```
       url => "https://172.232.121:8080/api/v4/projects/pi-uy-tt%2Ftestjobs/pipelines"
       method => get
       header => {
		   Accept => "application/json"
           private_token => "TnTLejtCS63SfmQzLMCG"
		}
	}

```

}  
request\_timeout =\> 60  
codec =\> "json"   
schedule =\> { cron =\> "\* \* \* \* \* UTC"}  
}  
}

Could you please help. Thanks !

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 22, 2017, 6:28am UTC](https://discuss.elastic.co/t/git-pipelines-integration/101121/6 "2017-09-22T06:28:32Z")

</div>

Aren't you supposed to use the token as the password for the user that requested the token rather than stuff it in a `private_token` header?

---

<div class="post-metadata">

**Author:** ![paul1243](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@paul1243](https://discuss.elastic.co/u/paul1243)\
**Post date:** [September 26, 2017, 9:06am UTC](https://discuss.elastic.co/t/git-pipelines-integration/101121/7 "2017-09-26T09:06:19Z")

</div>

I believe, it should be as a Private Token, it worked when I gave along with the URL.  
@magnusbaeck  
And Could you please let me know how do I fix this issue 🙂

![image](https://us1.discourse-cdn.com/elastic/original/3X/2/a/2a6b53a16193788eaa890938cbde90b9d61821e7.png)

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 26, 2017, 9:40am UTC](https://discuss.elastic.co/t/git-pipelines-integration/101121/8 "2017-09-26T09:40:10Z")

</div>

> I believe, it should be as a Private Token, it worked when I gave along with the URL.

Exactly what worked? What URL? What headers?

---

<div class="post-metadata">

**Author:** ![paul1243](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@paul1243](https://discuss.elastic.co/u/paul1243)\
**Post date:** [September 26, 2017, 9:42am UTC](https://discuss.elastic.co/t/git-pipelines-integration/101121/9 "2017-09-26T09:42:05Z")

</div>

@magnusbaeck  
url =\> "[https://gitlbtesting.com/pipelines?private\_token=yc6ZgsGb-P\_88sSRASP6](https://gitlbtesting.com/pipelines?private_token=yc6ZgsGb-P_88sSRASP6)"

The above URL worked.

Could you please how to resolve the below issue:

![image](https://us1.discourse-cdn.com/elastic/original/3X/2/a/2a6b53a16193788eaa890938cbde90b9d61821e7.png)

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [September 26, 2017, 10:28am UTC](https://discuss.elastic.co/t/git-pipelines-integration/101121/10 "2017-09-26T10:28:58Z")

</div>

> The above URL worked.

Okay, so add the token to the URL then. The `header` option is for adding HTTP headers.

> Could you please how to resolve the below issue:

OTOH I don't know what's wrong there.

---

<div class="post-metadata">

**Author:** ![paul1243](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@paul1243](https://discuss.elastic.co/u/paul1243)\
**Post date:** [September 26, 2017, 11:21am UTC](https://discuss.elastic.co/t/git-pipelines-integration/101121/11 "2017-09-26T11:21:21Z")

</div>

Hi @magnusbaeck

This is the new URL, am trying to poll the HTTP requests and get the data:

Here is the Conf file:

input {  
http\_poller {  
urls =\> {  
test1 =\> {  
url =\> "[https://10.12.22.110/statistics.json](https://10.12.22.110/statistics.json)"  
method =\> get  
user =\> "Admin"  
password =\> "Pass"  
headers =\> {  
Accept =\> "application/json"  
}  
}

}

ssl\_certificate\_validation =\> false  
request\_timeout =\> 60  
codec =\> "json"   
schedule =\> { cron =\> "\* \* \* \* \* UTC"}  
}  
}

output {  
stdout {  
codec =\> rubydebug  
}  
elasticsearch {  
hosts =\> "localhost:9200"  
index =\> "hppp"  
workers =\> 1  
}  
}

I see logstash is getting stuck, not able to get any data. ☹ could you please help.

---

<div class="post-metadata">

**Author:** ![paul1243](https://avatars.discourse-cdn.com/v4/letter/p/e99b99/32.png) [@paul1243](https://discuss.elastic.co/u/paul1243)\
**Post date:** [September 27, 2017, 12:04pm UTC](https://discuss.elastic.co/t/git-pipelines-integration/101121/12 "2017-09-27T12:04:04Z")

</div>

@magnusbaeck - Is there anything wrong with my ConF file. The URL returns a data in the format of JSON.  
Please let me know.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 25, 2017, 12:04pm UTC](https://discuss.elastic.co/t/git-pipelines-integration/101121/13 "2017-10-25T12:04:06Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
