Skip to content

Instantly share code, notes, and snippets.

@wheel5up
wheel5up / pihole-stats.yaml
Created July 7, 2024 21:07
Collecting pi-hole status with custom script
zabbix_export:
version: '6.4'
template_groups:
- uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
name: Templates/Applications
templates:
- uuid: 11f833e81adb4040b367a55d5cef4019
template: 'pi-hole stats'
name: 'pi-hole stats'
description: 'Gather pi-hole stats'
@wheel5up
wheel5up / content-pack-55e40bda-92c9-4094-b028-506d3c63ef36-1.json
Created June 30, 2024 22:24
Content Pack for Graylog ingesting pihole data from sqlite
{
"v": 1,
"id": "55e40bda-92c9-4094-b028-506d3c63ef36",
"rev": 1,
"name": "pihole",
"summary": "This content pack shows data from pi-hole",
"description": "This content pack expects data formed from an extraction script run on the pi-hole host.\n",
"vendor": "johnstephenwheeler@gmail.com",
"url": "",
"parameters": [],
@wheel5up
wheel5up / zbx_export_templates.yaml
Created April 6, 2024 16:48
QNAP SMART discovery with Zabbix 6.4
zabbix_export:
version: '6.4'
template_groups:
- uuid: e960332b3f6c46a1956486d4f3f99fce
name: 'Templates/Server hardware'
templates:
- uuid: ba541537a40f46eab3d292300ad4f062
template: 'QNAP SMART discovery'
name: 'QNAP SMART discovery'
description: 'QNAP SMART attributes'
@wheel5up
wheel5up / borg_backup.sh
Created February 19, 2024 22:09
borg backup with zabbix sender
#!/bin/zsh
# Automated User Data Backup Script for BorgBackup
PATH=$PATH:/usr/local/bin
BORG=/usr/local/bin/borg
ZSENDER=/usr/local/bin/zabbix_sender
JQ=/usr/local/bin/jq
HOST=$(hostname -s)
# Send all output to Graylog
# https://tldp.org/LDP/abs/html/process-sub.html
@wheel5up
wheel5up / zbx_export_templates.json
Created February 19, 2024 22:00
Zabbix template to capture borg backup status
{
"zabbix_export": {
"version": "6.4",
"template_groups": [
{
"uuid": "7df96b18c230490a9a0a9e2307226338",
"name": "Templates"
}
],
"templates": [
@wheel5up
wheel5up / sechub-jira.puml
Created October 19, 2023 16:48
AWS Securityhub to Jira flow
@startuml
state seachForJiraIssue:Search for Jira issue \nby AWS finding ID
state createOrUpdateJiraIssue <<choice>>
state SetJiraKeyFromSearch: Use the search response\nto set the Jira issue key
state createJiraIssue:Create Jira issue from finding
state SetJiraKeyFromCreate: Use the create response\nto set the Jira issue key
state moreThanOneJiraIssue: Fail State\nfinding ID's should be unique
state transitionJiraIssue: Reopen issue before update
state updateJiraIssue: Update Jira Issue
state closeJiraIssueCNR: Close Jira Issue\nCannot Reproduce
@wheel5up
wheel5up / Add sendgrid user records to confluence.postman_collection.json
Created June 20, 2023 01:51
Postman user add collection Application API
{
"info": {
"_postman_id": "7daec753-37e3-41ce-aca5-c108d332c367",
"name": "Add sendgrid user records to confluence",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "98609",
"_collection_link": "https://blue-shuttle-6120.postman.co/workspace/User-Adds~577d01e0-6cce-42c2-972a-6c7774fc2e78/collection/98609-7daec753-37e3-41ce-aca5-c108d332c367?action=share&creator=98609&source=collection_link"
},
"item": [
{
@wheel5up
wheel5up / sechub2jira.uml
Created April 29, 2023 18:45
State diagram of Security Hub findings integration with Jira
@startuml
!include <awslib/AWSCommon>
!include <awslib/AWSSimplified>
!include <awslib/Groups/StepFunctionsWorkflow>
state seachForJiraIssue:Search for Jira issue \nby finding ID
state createJiraIssue:Create Jira issue from finding
state createOrUpdateJiraIssue <<choice>>
state transitionOrUpdateJiraIssue <<choice>>
state moreThanOneJiraIssue: finding ID's should be unique
state transitionJiraIssue: Reopen issue before update
@wheel5up
wheel5up / GraylogMaxmind.plantuml
Created December 18, 2022 03:16
Graylog sharing a volume to Maxmind
@startuml
!include <kubernetes/k8s-sprites-labeled-25pct>
node "<$node>\nQNAP TS-473" {
file Maxmind {
component [<$vol>\n/usr/share/GeoIP] as maxmindpath
component [<$svc>\nMaxmind] as maxmindsvc
}
file Graylog {
component [<$svc>\nGraylog] as graylogsvc {
portout p1
@wheel5up
wheel5up / cmd.sh
Created May 7, 2022 14:21
Output of command in encrypt.bat
% java -cp dataloader-54.0.0-uber.jar com.salesforce.dataloader.security.EncryptionUtil
Utility to encrypt a string based on a static or a provided key
Options (mutually exclusive - use one at a time):
-e <plain text> <Path to keyfile> Encrypt a plain text value, keyfile path
-d <encryptText> <Path to keyfile> Decrypt an encrypted text back to plain text value using keyfile
-k [Path to Keyfile] Generate keyfile with optional keyfile path