Skip to content
This repository was archived by the owner on Sep 24, 2019. It is now read-only.

Commit 2c2220d

Browse files
authored
Merge branch 'master' into ui-text-edits
2 parents 74d698b + dc909f9 commit 2c2220d

18 files changed

+903
-279
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
/local
2-
/metadata/local.meta
1+
*.pyc
2+
tmpdir/

README.md

Lines changed: 22 additions & 144 deletions
Original file line numberDiff line numberDiff line change
@@ -1,162 +1,40 @@
1-
# Splunk App for Puppet Enterprise - Docs
2-
----
3-
- Splunk Add-on Community Supported (Puppet & Splunk Customers)
4-
### - Requirements to Run App
1+
# Splunk App for Puppet Enterprise
2+
3+
The Splunk App for Puppet Enterprise visualizes data from Puppet Enterprise.
4+
5+
## Requirements to run this app
6+
57
- Splunk Enterprise 7.0+
68
- Puppet Enterprise 2018.1.1+
9+
- Splunk Add-on for Puppet Enterprise (Obtain from [Splunkbase](https://splunkbase.splunk.com/app/3610/) or [Github](https://github.com/puppetlabs/SplunkTAforPuppetEnterprise/)) — _This component collects data from Puppet Enterprise and stores it in Splunk._
710

8-
### - Installation Steps
9-
----
10-
- First generate a token from Puppet Enterprise in the shell. Make sure to take into account how long you have the token generated. We recommend to at least set it too 12 Months. We will be putting this in the Add-on Menu to help you alert when it about to expire.
11-
```
12-
curl -k -X POST -H 'Content-Type: application/json' -d '{"login": "", "password": "","lifetime": "9y" }' https://$:4433/rbac-api/v1/auth/token
13-
```
14-
- Custom Factor Pull Setup (Option Step) - Make PR if you want to add a default to the pull.
15-
```
16-
for key, value in temp_one_dict1.iteritems():
17-
temp_one_dict2[key] = value
18-
temp_one_dict2['hostname'] = one_dict['facts']['hostname']
19-
temp_one_dict2['aio_agent_build'] = one_dict['facts']['aio_agent_build]'
20-
```
21-
- Setup Dictonary Key and then Reference back to API to see how you can browse for specific custom field. Reference Link to API: https://puppet.com/docs/puppetdb/5.2/api/query/v4/resources.html
11+
### Installation steps
2212

23-
### - Output of Factors in Json
24-
----
25-
```
26-
aio_agent_build: 5.5.6
27-
aio_agent_version: 5.5.6
28-
architecture: x86_64
29-
authenticated: remote
30-
bios_release_date: 11/29/2017
31-
bios_vendor: Xen
32-
certname: testing1234
33-
clientversion: 5.5.6
34-
domain: null
35-
expiration: 09/11/2018
36-
extensions: { [-]
37-
}
38-
facterversion: 3.11.4
39-
filesystems: xfs
40-
fqdn: testing1234
41-
hostname: testing1234
42-
ipaddress: 10.1.2,0
43-
ipaddress6: fe80::f48a:3947:7787:7775
44-
is_virtual: true
45-
kernel: Linux
46-
kernelmajversion: 3.10
47-
kernelrelease: 3.10.0-693.21.1.el7.x86_64
48-
macaddress: f2:64:33:78:12:24
49-
operatingsystem: CentOS
50-
operatingsystemmajrelease: 7
51-
operatingsystemrelease: 7.4.1708
52-
osfamily: RedHat
53-
pe_server_url_: automate01
54-
platform: x86_64-linux
55-
processorcount: 8
56-
processors: { [-]
57-
count: 8
58-
isa: x86_64
59-
models: [ [-]
60-
Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz
61-
Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz
62-
Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz
63-
Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz
64-
Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz
65-
Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz
66-
Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz
67-
Intel(R) Xeon(R) Gold 5115 CPU @ 2.40GHz
68-
]
69-
physicalcount: 4
70-
}
71-
puppetversion: 5.5.6
72-
selinux: true
73-
serialnumber: bc383f9f-c537-9c11-78f1-2274faf798ec
74-
sitedir: /opt/puppetlabs/puppet/lib/ruby/site_ruby/2.4.0
75-
uptime: 116 days
76-
uptime_days: 116
77-
uptime_hours: 2784
78-
uptime_seconds: 10022871
79-
uuid: BC383F9F-C537-9C11-78F1-2274FAF798EC
80-
version: 2.4.4
81-
virtual: xenhvm
82-
```
13+
1. Install and set up the [Add-on](https://github.com/puppetlabs/SplunkTAforPuppetEnterprise/)
14+
1. Install this App into Splunk
8315

84-
### Extended Details Pull Feature Explanation
85-
----
86-
```
87-
certname: testing1234
88-
configuration_version: 1537159231
89-
containing_class: Motd
90-
containment_path: [ [+]
91-
]
92-
corrective_change: false
93-
environment: production
94-
file: /etc/puppetlabs/code/environments/production/modules/motd/manifests/init.pp
95-
line: 84
96-
message: content changed '{md5}91e9830c08a9c585a061401389e48e38' to '{md5}c89ef7290d4031def9b9a4b419ad33a1'
97-
new_value: {md5}c89ef7290d4031def9b9a4b419ad33a1
98-
old_value: {md5}91e9830c08a9c585a061401389e48e38
99-
property: content
100-
report: 6e6b17efc5043981131145fc5593a3dc6602d2cb
101-
report_receive_time: 2018-09-17T04:41:02.934Z
102-
resource_title: /etc/motd
103-
resource_type: File
104-
run_end_time: 2018-09-17T04:41:02.364Z
105-
run_start_time: 2018-09-17T04:40:27.861Z
106-
status: success
107-
timestamp: 2018-09-17T04:40:38.709Z
108-
```
16+
## Version history
10917

110-
- Configuration state in Pull and reference fields are pulled from the following API. Reference Link to API: https://docs.puppet.com/puppetdb/4.0/api/query/v4/reports.html
18+
### Version 2.0
11119

112-
### Todos
113-
----
114-
- Adding Test for TravisCI for Splunk App-Inspect
20+
- Support for Multiple Versions of Puppet Enterprise
21+
- Rewrite of the Factor Pull, Customer Merge Dict Feature to Only Pull certain facts.
22+
- Added PE Metrics for MQ
23+
- Added Compiliation Timing
24+
- Filter for Multiple Version of Puppet Enterprise
25+
- Integration of VictorOps for Notification and Alerting
26+
27+
### Version 1.0
11528

116-
### Version History
117-
----
118-
**Version 1.0**
11929
- Includes Support for Self Signed (8081) + HTTP (8080) for PuppetDB Calls
12030
- Rewrite of all Extraction Fields + Cleanup of Resources, Classes, and CertName
12131
- Fixed API Key Storage
12232
- Fixed Title to Match Pulls
12333
- Fixed Help Text to Match Fields
12434
- Fixed Issue with Memoryleak on Timeout API Calls
12535

126-
**Version 2.0**
127-
- Support for Multiple Version of Puppet Enterprise
128-
- Rewrite of the Factor Pull, Customer Merge Dict Feature to Only Pull certain facts.
129-
- Added PE Metrics for MQ
130-
- Added Compiliation Timing
131-
- Filter for Multiple Version of Puppet Enterprise
132-
- Integration of VictorOps for Notification and Alerting
133-
134-
### License
135-
----
136-
[Splunk Third Party](http://docs.splunk.com/Documentation/AddonBuilder/2.2.0/UserGuide/Validate#Credit_third-party_libraries)
137-
138-
##### MIT License
139-
Copyright (c) [2017] [Splunk]
140-
Permission is hereby granted, free of charge, to any person obtaining a copy
141-
of this software and associated documentation files (the "Software"), to deal
142-
in the Software without restriction, including without limitation the rights
143-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
144-
copies of the Software, and to permit persons to whom the Software is
145-
furnished to do so, subject to the following conditions:
146-
147-
The above copyright notice and this permission notice shall be included in all
148-
copies or substantial portions of the Software.
149-
150-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
151-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
152-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
153-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
154-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
155-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
156-
SOFTWARE.
157-
15836
## Support
159-
----
160-
Are you a Splunk + Puppet customer who enjoys sharing knowledge and want to put some great feature into an opensource project. We encourage you to submit issues and pull request so that we can make this Technical Addon better and help the community as a whole get better insight to their Puppet Enterprise deployments.
37+
38+
Are you a Splunk + Puppet customer who enjoys sharing knowledge and want to put some great features into an open-source project? We encourage you to [submit issues](https://github.com/puppetlabs/SplunkTAforPuppetEnterprise/issues/new) and pull requests so that we can make this app better and help the community as a whole get better insight to their Puppet Enterprise deployments.
16139

16240
Feel free to leave comments or questions. We are here to make this community project more adaptive to all types of use cases.

README.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This is an add-on powered by the Splunk Add-on Builder.

SplunkAppForPuppetEnterprise.aob_meta

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"basic_builder": {"visible": true, "friendly_name": "Splunk App for Puppet Enterprise", "author": "Puppet, Inc.", "large_icon": "iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAADBklEQVR4Xu2cv2sUQRTHv+9uLyiJxmhCkgObIFY2VtYWikj8cQqHhQi21vYRFLQRLPwRRexEi8QgYiHqv6AoFiJKROQSPdBGJZq9fZI1SJDdnZ3ZXWfu9l27897efPh+3/xgZgkGP749OIT+6oBBaHzI1y9tOomlXHPmkIxMcvBc/QoYp0xiY2M4mKSjiw9zzZlDMgGkgCiABFA2n4mCREGioGwE/r+C+AKoczPyvexdAjAZ/awswzwFp6mxeDEKAt+r3wFwTAAJoISZtCgISFxqCCABpBw2kxerwRSWvl+NTLJu4DpAR8pdpJV4YxrIal5BTgCpAOENOp191Pw0byrCIuLcWayu9I75OTp0mJqtD0V01iSnW4BCSHiHza0dtNuN7Vf3AP1R0mt0gv0u2M0Q0PhZBDhhItkwhrAJoI2J8Y7YzQiQMZjVQL4/sg2+9xJE65Mh2bebFUChi2ZGd4Gqj0AYVCjJqt2sAQoh3R3ejr7aE4C2umo3q4BCSGntBnwEcAuEwNjiy63z1MQvnXjrgLTsptOzqLb+8gZqtr/ppHECkJbddHr3b9tuBqRpNzNM3Q6ocLv1AqC/dqvVnoGo30wqMVG9AiiENDu+AKIxARRDQAAppCGABFC26iEKEgWJgrIREAVl4yc1SBRkriCeHZ0AKi9AlO9h9V5YavDMyE5UvKcADZkj7tG1mMbuohm7blbQqq0eg2jCrPcporoVUKG2WsutGwFp2Kp8m/apbcX8Cp7foEPttymMlGsTa5v2qW3FPA/P32sDzgppK4BS28qBkx5GgHhubApB5bixlglbACTPcyzaam2/DAEVcONw7b+ybCu3ATlgK3cBOWIrRwHxe1T9PbZGq7h66k4NkmPAqg2g8twXOwPma9E4KtMANSKflUZBcttHbvsoJ8hyX0xVT5O+3SEWE4tlsxjzOVR/3ohMEvRdBioHyz2KKfHGNCjNMC+AFDVIAAkgpQbkE11Z5kFKvFKkzRD11Cj2oD4M30++56WLyfu8QAfwQzes6Pa/AUhKlWd3R9gsAAAAAElFTkSuQmCC", "version": "2.0.1", "build_no": 5, "appname": "SplunkAppForPuppetEnterprise", "small_icon": "iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAACC0lEQVRYR+2YTWsTURiFz0lnmiYoYrRpK0oX/RWiSJduRE1DJaIrd4L/pTtXioJFCaYVBEEouNEfUAqlGzeKtYmlXZQaDc49kpREG3JzJ01ipphZDu9973PP+3E/CMunQuo86GcgxGw2jf+VIM/c9qbTLoQBrUDLk7MwXAE54vQjXObc5genXQiDYwwklQAEtUUSPsCzjQUPRCG/PM1ru5+qECqkL4He+yHQoaSOnELSI8SwVwuTdA6IzQ82ZO1K1gS3mS0+D1HVTpPelD20B5kM54orzhkdBj0CqoYRZfDXRWZKq91A2YHeII5KKg2Mtfb/o5LAqL8A4CrAAz/SdyjIMFt6e1QoK1AYh1o6eQY6UQBxpQFVDR90DzL2vS3QR85/22o1R1dAdYd6OfUOMc6GWcRBpzf3eXPrYf+A8pPj8Pj0UPja0fUbqJY+y+kZGG8NRMKp1D8BepW6ABPfAJgcArVSQEOFHImhF+kZ+BFJai2eOo2x5GMQ1/80yDYr6HeVRaYx1pRJJBeb9rN9UA9gaN86vJ/rvLHzuaNOrTxGgfGUVfgRLw5goSlMZZjgFrPF185eZDE4RsePji6K2odMrhtl6oL1RiGju8x+fXbUMP09LjxQ5A75kbsGDYGaMlLNVSZ8AVR/bIgDnGgMGchjQ7sS+j+BClPTIO5ACvGkV3nCXOu9qdPe9BvCCFQ0gPAA5gAAAABJRU5ErkJggg==", "description": "", "tab_version": "2.2.0", "tab_build_no": "12", "theme": "#000000"}, "validation": {"status": "job_finished", "progress": 1.0, "validation_id": "v_1537469735_62", "validators": ["best_practice_validation", "data_model_mapping_validation", "field_extract_validation", "app_cert_validation"]}, "field_extraction_builder": {"pe:metrics:orchestrator": {"data_format": "tabular", "table_results": {"delim": ","}}, "pe:metrics:puppetserver": {"data_format": "tabular", "table_results": {"delim": ","}}, "pe:metrics:puppetdb": {"data_format": "unstructured_data"}}}

app.manifest

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
"id": {
66
"group": null,
77
"name": "SplunkAppForPuppetEnterprise",
8-
"version": "2.0"
8+
"version": "2.0.1"
99
},
1010
"author": [
1111
{
12-
"name": "Domnick Eger",
12+
"name": "Puppet, Inc.",
1313
"email": null,
1414
"company": null
1515
}

default/data/ui/views/home.xml

Lines changed: 2 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,103 +1,4 @@
11
<form>
2-
<label>Puppet Enterprise - Facts</label>
3-
<fieldset submitButton="false">
4-
<input type="multiselect" token="certname" searchWhenChanged="true">
5-
<label>Puppet Managed Hosts</label>
6-
<choice value="*">ALL</choice>
7-
<prefix>certname="</prefix>
8-
<suffix>"</suffix>
9-
<fieldForLabel>certname</fieldForLabel>
10-
<fieldForValue>certname</fieldForValue>
11-
<search>
12-
<query>sourcetype="pe:factors" | dedup certname | table certname</query>
13-
<earliest>-24h@h</earliest>
14-
<latest>now</latest>
15-
</search>
16-
<default>*</default>
17-
</input>
18-
<input type="multiselect" token="pe_server_url" searchWhenChanged="true">
19-
<label>Puppet Enterprise Server</label>
20-
<choice value="*">ALL</choice>
21-
<default>*</default>
22-
<prefix>pe_server_url_="</prefix>
23-
<suffix>"</suffix>
24-
<fieldForLabel>pe_server_url_</fieldForLabel>
25-
<fieldForValue>pe_server_url_</fieldForValue>
26-
<search>
27-
<query>sourcetype="pe:factors" |dedup pe_server_url_ | table pe_server_url_</query>
28-
<earliest>-15m</earliest>
29-
<latest>now</latest>
30-
</search>
31-
<delimiter> </delimiter>
32-
</input>
33-
</fieldset>
34-
<row>
35-
<panel>
36-
<single>
37-
<title>Hosts Managed by Puppet</title>
38-
<search>
39-
<query>sourcetype="pe:factors" |dedup certname | timechart count(certname)</query>
40-
<earliest>-24h@h</earliest>
41-
<latest>now</latest>
42-
</search>
43-
<option name="drilldown">none</option>
44-
</single>
45-
</panel>
46-
<panel>
47-
<single>
48-
<title>Number of Puppet Enterprise Masters</title>
49-
<search>
50-
<query>sourcetype="pe:factors" |dedup certname | timechart distinct_count(pe_server_url_)</query>
51-
<earliest>-24h@h</earliest>
52-
<latest>now</latest>
53-
</search>
54-
</single>
55-
</panel>
56-
<panel>
57-
<single>
58-
<title>Number of Virtual Machines</title>
59-
<search>
60-
<query>sourcetype="pe:factors" |dedup certname | timechart count(is_virtual)</query>
61-
<earliest>-24h@h</earliest>
62-
<latest>now</latest>
63-
</search>
64-
<option name="drilldown">none</option>
65-
</single>
66-
</panel>
67-
</row>
68-
<row>
69-
<panel>
70-
<table>
71-
<search>
72-
<query>sourcetype="pe:factors" $certname$ $pe_server_url$ |dedup certname
73-
| eval api_end_epoch=strptime(expiration,"%m/%d/%y")
74-
| eval days_left=round((api_end_epoch-now())/86400,0)
75-
| rename certname as Hosts
76-
| rename osfamily as "OS Family"
77-
| rename pe_server_url_ as Facts
78-
| rename expiration as "Token Generation Date"
79-
| rename clientversion as "Puppet Agent Version"
80-
| rename uptime as "Uptime"
81-
| rename architecture as "Architecture"
82-
| rename _time as "Last Updated"
83-
| rename days_left as "Token Expires"
84-
| table Hosts Facts "OS Family" Architecture "Puppet Agent Version" Uptime "Last Updated" "Token Generation Date" "Token Expires"</query>
85-
<earliest>-15m</earliest>
86-
<latest>now</latest>
87-
<sampleRatio>1</sampleRatio>
88-
</search>
89-
<option name="count">20</option>
90-
<option name="dataOverlayMode">none</option>
91-
<option name="drilldown">cell</option>
92-
<option name="percentagesRow">false</option>
93-
<option name="refresh.display">progressbar</option>
94-
<option name="rowNumbers">false</option>
95-
<option name="totalsRow">false</option>
96-
<option name="wrap">true</option>
97-
<drilldown target="_blank">
98-
<link>https://$row.Facts$/#/inspect/node/$row.Hosts$/facts</link>
99-
</drilldown>
100-
</table>
101-
</panel>
102-
</row>
2+
<label>SplunkAppForPuppetEnterprise</label>
3+
<description>This is an example view in add-on SplunkAppForPuppetEnterprise</description>
1034
</form>

local/app.conf

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# this add-on is powered by splunk Add-on builder
2+
[install]
3+
state_change_requires_restart = true
4+
is_configured = false
5+
state = enabled
6+
build = 5
7+
8+
[launcher]
9+
author = Puppet, Inc.
10+
version = 2.0.1
11+
12+
[ui]
13+
is_visible = 1
14+
label = Splunk App for Puppet Enterprise
15+
docs_section_override = AddOns:released
16+
17+
[package]
18+
id = SplunkAppForPuppetEnterprise
19+
20+
[triggers]
21+
reload.addon_builder = simple
22+
reload.splunkappforpuppetenterprise_account = simple
23+
reload.splunkappforpuppetenterprise_settings = simple
24+
reload.passwords = simple

local/data/ui/nav/default.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<nav color="#000000">
2+
<view name="puppet_enterprise__overview" default="true" label="Puppet System Overview" />
3+
<view name="overview" default="true" label="Puppet Enterprise Overview" />
4+
<view name="puppet_enterprise__facts" default="true" label="Puppet Facts" />
5+
<view name="puppet_enterprise__extended_details" default="true" label="Extended Details" />
6+
7+
<collection label="Documentation">
8+
<!-- <view name="data_source" /> -->
9+
<a target="_blank" href="https://splunkbase.splunk.com/app/3611/#/details">Install Documentation</a>
10+
<a target="_blank" href="https://answers.splunk.com/answers/ask.html?appid=3611">Ask a Question</a>
11+
</collection>
12+
13+
14+
15+
16+
</nav>

0 commit comments

Comments
 (0)