All Apps and Add-ons

Where can I find the Jenkins plugin for splunk?

Hemnaath
Motivator

Hi All, I am creating an POC to ingest Jenkins event into Splunk and I have checked in the Splunk answers.com and found the link https://wiki.jenkins.io/display/JENKINS/Splunk+Plugin+for+Jenkins and based on document, I have gone through the steps, and downloaded the Zip file from the git repository splunk-devops-plugin-master but I am not sure how to package this plugin using the maven, so any one guide me on this it will be really help full to create the POC.

0 Karma

arjunpkishore5
Motivator

This has to be installed on your Jenkins server and not your Splunk Server. As mentioned in the link you posted, this has to be installed as a plugin on Jenkins and then configure it to send data to the Splunk server. This documentation is pretty exhaustive and I have set this up in the past per documentation and it works fine.

On the splunk side, you need a HEC input setup. This plugin sends data to Splunk through HEC.

Splunk has the Jenkins app which is used for visualizing the data sent by the Jenkins server.

0 Karma

Hemnaath
Motivator

Hi Arjun, thanks for your response on this, I had just followed the steps mentioned in this link " https://wiki.jenkins.io/display/JENKINS/Splunk+Plugin+for+Jenkins" I am creating an POC on this, so I had installed both the Splunk instance and Jenkins in same machine.

Steps:

  1. Installed Java 1.8 version in 64 bit Windows Platform.
  2. Installed Jenkins-2.190.3 in 64 bit windows Platform.
  3. Splunk Enterprise 7.3 (Single instance deployment method).
  4. Installed Splunk App for Jenkins 2.0.
  5. Created HEC token in splunk.
  6. Configured Splunk plugin for Jenkins.
  7. Test Connection --> Splunk connection Verified.
  8. Validating the connection checking the Splunk console and able to see the below events information when we perform "Test Connection"

    12/9/19
    10:04:25.036 PM ping from jenkins plugin raw event ping
    host = xxxxx source = http:jenkins sourcetype = text:jenkins

  9. Configured custom metadata -->
    Data Source --> Build Event
    Config Item --> Index
    Value --> Customer_index

But when I am trying to check with Splunk APP for Jenkins, unable to see any data, so could you please guide me how /where to trouble shoot this issue.

0 Karma

Hemnaath
Motivator

Hi Team, Can any one correct me where I am committing mistake in integrating splunk with Jenkins.

thanks in advance.

0 Karma

Hemnaath
Motivator

From the windows command prompt, I had executed the following mvn commands but it lead to failure.

F:\Softwares\Jenkins-Splunk integration\splunk-devops-plugin-master>mvn clean
[INFO] Scanning for projects...
[WARNING] The POM for org.jenkins-ci.tools:maven-hpi-plugin:jar:3.6 is missing,
no dependency information available
[WARNING] Failed to build parent project for com.splunk.splunkins:pom:pom:1.8.3-
SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Splunk Plugin Main Module                                          [pom]
[INFO] Shaded http client and gson jar                                    [jar]
[INFO] Splunk Plugin                                                      [hpi]
[INFO] Splunk Plugin Extension                                            [hpi]
[INFO]
[INFO] ----------------------< com.splunk.splunkins:pom >----------------------
[INFO] Building Splunk Plugin Main Module 1.8.3-SNAPSHOT                  [1/4]

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] No compiler is provided in this environment. Perhaps you are running on
a JRE rather than a JDK?
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Splunk Plugin Main Module 1.8.3-SNAPSHOT:
[INFO]
[INFO] Splunk Plugin Main Module .......................... SUCCESS [  5.060 s]
[INFO] Shaded http client and gson jar .................... SUCCESS [  2.037 s]
[INFO] Splunk Plugin ...................................... FAILURE [  4.633 s]
[INFO] Splunk Plugin Extension ............................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  13.822 s
[INFO] Finished at: 2019-11-29T23:14:57+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.
8.1:compile (default-compile) on project splunk-devops: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on
a JRE rather than a JDK?
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e swit
ch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.

Kindly guide me how to fix this issue.

0 Karma

Hemnaath
Motivator

Hi Guys can any one throw some lights on how to rectify the below error to package the jar file for Jenkins plugin for splunk.

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.
8.1:compile (default-compile) on project splunk-devops: Compilation failure
[ERROR] No compiler is provided in this environment. Perhaps you are running on
a JRE rather than a JDK?

0 Karma

Hemnaath
Motivator

Hi All,

The above error is fixed and I am able to communicate with splunk from Jenkins and could see the raw ping events in Splunk Console. But when trying to walk through the Splunk APP for Jenkins, I am unable to get any data visualization.
As per the Splunk Plugin for Jenkins Wiki, I had configured the Custom metadata added data source as Build Event with Index=Index and Value=customer_index.
For validation purpose In Jenkins created an Hello World Project to get the Job status in Splunk, unfortunately unable to get any data in Splunk. Kindly guide me how to configure the metadata under splunk for Jenkins.

Thanks in advance.

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...