Skip to content

Commit

Permalink
Merge pull request #20 from coreymbe/PIE-1089-aob_updates
Browse files Browse the repository at this point in the history
(PIE-1089) Splunk Add-on Builder updates
  • Loading branch information
actowery authored May 1, 2024
2 parents 218ce30 + 8074e59 commit 65ed76d
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 29 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,26 @@ on:
jobs:
package-app:
runs-on: ubuntu-latest
container: ghcr.io/coreymbe/splunk-appinspect:v2
container: ghcr.io/coreymbe/splunk-appinspect:v3

steps:
- uses: actions/checkout@v4

- name: Set Version ID
id: version-tag
run: echo ::set-output name=version::${GITHUB_REF#refs/*/}
run: echo "version=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT

- name: Set App Name
id: repo-name
run: |
repo_name=$(basename ${{ github.repository }})
echo "splunk_app=$repo_name" >> $GITHUB_OUTPUT
- name: Build and Package App
run: slim package TA-puppet-alert-orchestrator
run: slim package ${{ steps.repo-name.outputs.splunk_app }}

- name: Upload App Build
uses: actions/upload-artifact@v4
with:
name: TA-puppet-alert-orchestrator-${{ steps.version-tag.outputs.version }}
path: TA-puppet-alert-orchestrator-*.tar.gz
name: ${{ steps.repo-name.outputs.splunk_app }}-${{ steps.version-tag.outputs.version }}
path: ${{ steps.repo-name.outputs.splunk_app }}-*.tar.gz
17 changes: 10 additions & 7 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,31 @@ on:
jobs:
appinspect:
runs-on: ubuntu-latest
container: ghcr.io/coreymbe/splunk-appinspect:v2
container: ghcr.io/coreymbe/splunk-appinspect:v3

steps:
- uses: actions/checkout@v4

- name: Install JQ
run: apt update && apt install -y jq
- name: Set App Name
id: repo-name
run: |
repo_name=$(basename ${{ github.repository }})
echo "splunk_app=$repo_name" >> $GITHUB_OUTPUT
- name: Run AppInspect
run: splunk-appinspect inspect TA-puppet-alert-orchestrator --output-file appinspect_result.json --mode precert
run: splunk-appinspect inspect ${{ steps.repo-name.outputs.splunk_app }} --output-file appinspect_result.json --mode precert --included-tags cloud

- name: Check AppInspect Errors
id: appinspect-errors
run: |
error_check=$(jq '.summary.error' appinspect_result.json)
echo "::set-output name=error_count::$error_check"
echo "error_count=$error_check" >> $GITHUB_OUTPUT
- name: Check AppInspect Failures
id: appinspect-failures
run: |
fail_check=$(jq '.summary.failure' appinspect_result.json)
echo "::set-output name=fail_count::$fail_check"
echo "fail_count=$fail_check" >> $GITHUB_OUTPUT
- name: AppInspect Errors
if: ${{ steps.appinspect-errors.outputs.error_count > 0 }}
Expand All @@ -46,5 +49,5 @@ jobs:
- name: Upload AppInspect Results
uses: actions/upload-artifact@v4
with:
name: AppInspect_TA-puppet-alert-orchestrator
name: AppInspect_${{ steps.repo-name.outputs.splunk_app }}
path: appinspect_result.json
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@

This Splunk add-on can be used to trigger Puppet Enterprise Orchestration actions such as plan or task execution; as well as generating detailed Puppet report data.

This add-on is intended to be used alongside the [Puppet Report Viewer](https://splunkbase.splunk.com/app/4413/), with data provided by the [splunk_hec](https://forge.puppet.com/puppetlabs/splunk_hec) report processor available on the Puppet Forge.
This add-on is intended to be used alongside the [Puppet Report Viewer app for Splunk](https://splunkbase.splunk.com/app/4413/), with data provided by the [splunk_hec](https://forge.puppet.com/puppetlabs/splunk_hec) report processor available on the Puppet Forge.

## Configuration

After installing and configuring both the `splunk_hec` Puppet module and the Puppet Report Viewer app for Splunk; follow the steps below to configure the [Puppet Alert Orchestrator add-on for Splunk](https://splunkbase.splunk.com/app/4928/):
After installing and configuring both the `splunk_hec` Puppet module and the Puppet Report Viewer app for Splunk; follow the steps below to configure the [Puppet Alert Orchestrator add-on for Splunk](https://splunkbase.splunk.com/app/7318/):

### Configuration Tabs

Expand Down
15 changes: 6 additions & 9 deletions TA-puppet-alert-orchestrator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

This Splunk add-on can be used to trigger Puppet Enterprise Orchestration actions such as plan or task execution; as well as generating detailed Puppet report data.

This add-on is intended to be used alongside the [Puppet Report Viewer](https://splunkbase.splunk.com/app/4413/), with data provided by the [splunk_hec](https://forge.puppet.com/puppetlabs/splunk_hec) report processor available on the Puppet Forge.
This add-on is intended to be used alongside the [Puppet Report Viewer app for Splunk](https://splunkbase.splunk.com/app/4413/), with data provided by the [splunk_hec](https://forge.puppet.com/puppetlabs/splunk_hec) report processor available on the Puppet Forge.

## Configuration

Expand All @@ -30,14 +30,12 @@ Add account details for multiple PE RBAC users.
* **Password**: Password _or_ PE RBAC Token
* Check the `pe_token` checkbox if you provide a PE RBAC Token instead of a password.

![Account](readme/img/account_config.png)
![Account](322b0a10-fceb-11ee-aed0-9ac19b020734.png)

#### Logging

Default log level is `INFO`.

![Logging](readme/img/logging_config.png)

#### Add-on settings

The following are required fields.
Expand All @@ -49,15 +47,14 @@ The following are required fields.

**Note**: See the [Splunk HEC Documentation](https://docs.splunk.com/Documentation/Splunk/latest/Data/UsetheHTTPEventCollector) for details on determining the correct URL for your HEC endpoint.

![Settings](readme/img/settings_config.png)
![Settings](cd719d1e-fcea-11ee-91e6-52042cae3bc7.png)

**Note**: Once the add-on has been configured, Splunk will need to be restarted.

## Orchestrator Actions

The Orchestrator Actions dashboard is powered by a custom input script which utilizes the configured account credentials to query Puppet Enterprise for Tasks and Plans available to that particular RBAC user.

![Actions](readme/img/orchestrator_actions.png)

#### Splunk Cloud

Expand Down Expand Up @@ -91,15 +88,15 @@ Once the add-on has been properly configured you can begin creating new Alerts t

1. Create a Splunk search:

![Splunk Search](readme/img/splunk_search.png)
![Splunk Search](d08e551e-fcea-11ee-83a8-92aa9ede6029.png)

2. Save the search as an Alert:

![Save Splunk Search](readme/img/save_as_alert.png)
![Save Splunk Search](caa740c0-fcea-11ee-95bf-8a4951598e2a.png)

3. Configure the Alert Actions:

![Alert Action Configuration](readme/img/alert_options.png)
![Alert Action Configuration](c5c4b83a-fcea-11ee-93e7-9ac19b020734.png)

## Example Searches

Expand Down
2 changes: 1 addition & 1 deletion TA-puppet-alert-orchestrator/app.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": {
"group": null,
"name": "TA-puppet-alert-orchestrator",
"version": "1.0.0"
"version": "1.0.1"
},
"author": [
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions TA-puppet-alert-orchestrator/default/addon_builder.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# this file is generated by add-on builder automatically
# please do not edit it
[base]
builder_version = 4.1.1
builder_version = 4.2.0
builder_build = 0
is_edited = 1
is_edited = 0

2 changes: 1 addition & 1 deletion TA-puppet-alert-orchestrator/default/app.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build = 5

[launcher]
author = Puppet, Inc.
version = 1.0.0
version = 1.0.1
description = Collection of alert actions specifically for Puppet Enterprise.

[ui]
Expand Down
12 changes: 12 additions & 0 deletions TA-puppet-alert-orchestrator/readme/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Release Notes

### Puppet Alert Orchestrator add-on for Splunk

## Version 1.0.1

**Fixes**:

* Updated add-on for compatibility with [Splunk Add-on Builder v4.2.0](https://splunkbase.splunk.com/app/2962).

## Version 1.0.0

**Breaking Changes**:
Expand All @@ -18,6 +26,10 @@
* "Run a Puppet Task" **Action**.
* When configuring the action, the Task name is populated with the same data as the Orchestrator Actions dashboard.

---

### Puppet Alert Actions

## Version 0.6.0

**Fixes**:
Expand Down
2 changes: 1 addition & 1 deletion TA-puppet-alert-orchestrator/readme/PUBLISHING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ First open a release prep PR to update the following files:
* `README.md`
* `readme/CHANGELOG.md`

Tagging the release in GitHub will trigger the [release workflow](https://github.com/puppetlabs/TA-puppet-alert-actions/workflows/release.yml) to build the app package.
Tagging the release in GitHub will trigger the [release workflow](https://github.com/puppetlabs/TA-puppet-alert-orchestrator/actions/workflows/release.yml) to build the app package.

Tag the release with the appropriate version ID and push the tag upstream:

Expand Down

0 comments on commit 65ed76d

Please sign in to comment.