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

mk-livestatus and nagvis #180

Draft
wants to merge 62 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
b8cbafa
Add mk_livestatus
mmerian Apr 21, 2020
aad86c7
Upgrade nagios and install the nagvis plugin
pgmac Mar 10, 2024
73a441d
Create docker-image.yml
pgmac Mar 10, 2024
2d6cbb6
Update docker-image.yml
pgmac Mar 11, 2024
71c1438
Update README.md
pgmac Apr 6, 2024
29f995d
Add some volumes for nagvis. Cleanup and simplify the build
pgmac Apr 7, 2024
e52fd68
Upgrade nagios with nagvis
pgmac May 17, 2024
f3c559a
Upgrade nagios to 4.5.2
pgmac May 17, 2024
3a7d868
Upgrade nagios to 4.5.2
pgmac May 17, 2024
587e09b
Merge branch 'nagios-4.5.2'
pgmac May 17, 2024
17484d6
Remove the nagvis bits
pgmac May 17, 2024
d49a529
Update the doc table, too
pgmac May 17, 2024
8731692
Yeah - this will never trigger on the tag update
pgmac May 17, 2024
3e33909
Upgrade the bits
pgmac Jun 13, 2024
2dbab09
Use the correct version here
pgmac Jun 13, 2024
54b58ea
Upgrade nagios. Some some pid file cleanup on container start
pgmac Sep 7, 2024
fb9a2aa
fix: Dockerfile to reduce vulnerabilities
snyk-bot Sep 22, 2024
de5f890
Update Dockerfile
pgmac Sep 22, 2024
89bb71e
Merge pull request #2 from pgmac-net/snyk-fix-f7d365ad14afdd8e969e0d6…
pgmac Sep 22, 2024
ef28f31
Manually patching in some upstream changes
pgmac Oct 6, 2024
d3b1496
Change the pip install to an apt install. Change netcat to the openbs…
pgmac Oct 6, 2024
5605fc0
Update Dockerfile
pgmac Oct 15, 2024
a57906b
Bump nagios core
pgmac Oct 27, 2024
f1a8af6
SBoM and attest
pgmac Nov 30, 2024
2930250
Fix the workflow - I done borked it
pgmac Dec 1, 2024
3247108
Fix the spelling mistake
pgmac Dec 1, 2024
a5272d3
Create anchore-syft.yml
pgmac Dec 1, 2024
e358788
Update anchore-syft.yml
pgmac Dec 1, 2024
4bdc9e9
Some studly(caps) changes
pgmac Dec 1, 2024
9ac4f65
Auto Create the DT project
pgmac Dec 1, 2024
811a30a
More jiggery
pgmac Dec 1, 2024
c857c8c
Slightly less dodgy - still highly dodgy
pgmac Dec 1, 2024
dfa7193
Do the tags
pgmac Dec 1, 2024
7c6921a
Add some permissions to do attesting
pgmac Dec 4, 2024
d44f434
Update anchore-syft.yml
pgmac Dec 4, 2024
db50813
Upgrade Ubuntu docker base
pgmac Dec 4, 2024
c407fa3
Merge branch 'master' of github.com:pgmac-net/Docker-Nagios
pgmac Dec 4, 2024
6b8ec3b
Update anchore-syft.yml
pgmac Dec 13, 2024
29f9167
Build, attest, scan and socialise the software bill of materials
pgmac Dec 19, 2024
2a99b75
Merge branch 'master' of https://github.com/pgmac-net/Docker-Nagios
pgmac Dec 19, 2024
c963b0f
Don't need to upload twice
pgmac Dec 19, 2024
d539f86
Oh yeah- I renamed that job
pgmac Dec 19, 2024
90a3a43
Don't need the dodgy fail here
pgmac Dec 19, 2024
ad883b7
Run it on the main branch
pgmac Dec 19, 2024
e57ead1
Run these on my self-hosted runners
pgmac Dec 19, 2024
e3a7eb1
Don't need the separate verify anymore
pgmac Dec 19, 2024
7e076fa
Create dependabot.yml
pgmac Dec 20, 2024
5705ec7
Update sbom.yml
pgmac Dec 20, 2024
0dc87ab
Use github.repository instead
pgmac Dec 21, 2024
447a7f6
Replace with the reusable workflow
pgmac Dec 23, 2024
7569100
Upgrade nagios and it's bits
pgmac Dec 23, 2024
e0aceef
Don't push the attestation artefact to the OCI registry
pgmac Dec 23, 2024
f6d0c1e
Update Dockerfile
pgmac Jan 21, 2025
f04afbc
Update README.md
pgmac Jan 21, 2025
5128dd9
Update Dockerfile
pgmac Jan 21, 2025
29b8fa4
Merge pull request #5 from pgmac-net/feature/upstream-pulli-ns
pgmac Jan 21, 2025
c2f5aaa
Pull my copy of mk-livestatus
pgmac Jan 22, 2025
7479167
Build mk-livestatus, add in some deps
pgmac Jan 27, 2025
a03edaa
Add nagvis into the mix
pgmac Jan 27, 2025
1abe098
Do the config replacements, configure a little auth, chown the dir
pgmac Jan 28, 2025
70d12af
Add the mk-livestatus into the config
pgmac Jan 28, 2025
b6a54f9
NagVis updates
pgmac Jan 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "docker" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
70 changes: 70 additions & 0 deletions .github/workflows/anchore-syft.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# This workflow checks out code, builds an image, performs a container image
# scan with Anchore's Syft tool, and uploads the results to the GitHub Dependency
# submission API.

# For more information on the Anchore sbom-action usage
# and parameters, see https://github.com/anchore/sbom-action. For more
# information about the Anchore SBOM tool, Syft, see
# https://github.com/anchore/syft
name: Anchore Syft SBOM scan

on:
workflow_dispatch:
workflow_run:
workflows: [ "Build my Nagios image and push to my registry" ]
types: [ completed ]
# push:
# tags:
# - "*.*.*"

jobs:
Anchore-Build-Scan:
permissions:
contents: write # required to upload to the Dependency submission API
id-token: write
attestations: write
actions: read
runs-on: self-hosted
steps:
- name: Set the image version
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT

- name: Scan the image and upload dependency results
uses: anchore/sbom-action@bb716408e75840bbb01e839347cd213767269d4a
with:
#image: macro.int.pgmac.net:5000/nagios:${{ inputs.tags || steps.vars.outputs.tag }}
path: ./
format: cyclonedx-json
output-file: syft-sbom.json
artifact-name: syft-sbom.json
upload-artifact: true
dependency-snapshot: true

- name: SHA256 hash the SBoM
id: sha256
run: echo "SHA256=$(sha256sum syft-sbom.json | cut -d ' ' -f1)" >> $GITHUB_ENV

- name: Attest the SBoM
uses: actions/attest-build-provenance@v1
with:
subject-name: macro.int.pgmac.net:5000/Docker-Nagios/syft-sbom.json
subject-digest: sha256:${{ env.SHA256 }}
show-summary: true
push-to-registry: false

- name: Upload SBoM to Dependency Track
uses: DependencyTrack/[email protected]
with:
serverHostname: 'dtrack.int.pgmac.net'
protocol: 'https'
apiKey: ${{ secrets.DT_APIKEY }}
projectName: Docker-Nagios
projectVersion: ${{ inputs.tags || steps.vars.outputs.tag }}
bomFilename: 'syft-sbom.json'
autoCreate: true
117 changes: 117 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
name: Build my Nagios image and push to my registry

on:
push:
tags:
- "*.*.*"
workflow_dispatch:
jobs:
build-n-push:
permissions:
id-token: write
attestations: write
actions: read
contents: write
runs-on: self-hosted
steps:
- uses: actions/checkout@v3

- name: Set the image version
id: vars
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT

- name: Build the Docker image
run: docker build . --file Dockerfile --tag macro.int.pgmac.net:5000/nagios:${{ inputs.tags || steps.vars.outputs.tag }}

- name: Push to my internal registry
run: docker push macro.int.pgmac.net:5000/nagios:${{ inputs.tags || steps.vars.outputs.tag }}

- name: Run Syft SBoM scan
uses: anchore/[email protected]
with:
image: macro.int.pgmac.net:5000/nagios:${{ inputs.tags || steps.vars.outputs.tag }}
format: cyclonedx-json
output-file: syft-sbom.json
artifact-name: syft-sbom.json

- name: Upload SBoM to GitHub Artifact storage
uses: actions/upload-artifact@v4
with:
name: syft-sbom.json
path: "syft-sbom.json"
retention-days: 2
overwrite: true

- name: SHA256 hash the SBoM
id: sha256
run: echo "SHA256=$(sha256sum syft-sbom.json | cut -d ' ' -f1)" >> $GITHUB_ENV

- name: Attest the SBoM
uses: actions/attest-build-provenance@v1
with:
subject-name: macro.int.pgmac.net:5000/Docker-Nagios/syft-sbom.json
subject-digest: sha256:${{ env.SHA256 }}
show-summary: true
push-to-registry: false

- name: Upload SBoM to Dependency Track
uses: DependencyTrack/[email protected]
with:
serverhostname: "dtrack.int.pgmac.net"
protocol: "https"
apikey: ${{ secrets.DT_APIKEY }}
project: ${{ secrets.DT_PROJECT_UUID }}
bomfilename: "syft-sbom.json"
autocreate: false

- name: Exit code failure
if: failure()
run: |
echo "colour=danger" >> $GITHUB_ENV
echo "icon=🛑" >> $GITHUB_ENV

- name: Exit code cancelled
if: cancelled()
run: |
echo "colour=warning" >> $GITHUB_ENV
echo "icon=⚠" >> $GITHUB_ENV

- name: Exit code success
if: success()
run: |
echo "colour=good" >> $GITHUB_ENV
echo "icon=✅" >> $GITHUB_ENV

- name: Send Slack message
uses: slackapi/[email protected]
with:
payload: |
{
"channel": "builds",
"attachments": [
{
"mrkdwn_in": ["text", "pretext"],
"fallback": ${{ toJSON(join(github.event.commits.*.message, '<br>') || ':point_right: Manually triggered') }},
"color": "${{ env.colour || 'grey' }}",
"pretext": "${{ env.icon || '?' }} ${{ github.workflow }} (${{ github.ref_name }}) #${{ github.run_number }}",
"author_name": "${{ github.triggering_actor || github.actor }}",
"title": "${{ github.workflow }}",
"title_link": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"text": ${{ toJSON(join(github.event.commits.*.message, '\n') || ':point_right: Manually triggered') }}
},
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "<${{ github.event.pull_request.html_url || github.event.head_commit.url || github.server_url }}|View commit>"
}
}
]
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
18 changes: 18 additions & 0 deletions .github/workflows/sbom.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Build a bill of materials ... and scan it

on:
push:
branches: ["master"]

workflow_dispatch:

jobs:
sbom:
uses: pgmac-net/pg-actions/.github/workflows/sbom.yml@main
secrets: inherit
permissions:
attestations: write
contents: write
security-events: write
id-token: write
actions: read
Loading