Skip to content

Commit

Permalink
Merge pull request #31 from takkt-ag/feature/example-config
Browse files Browse the repository at this point in the history
chore: example config yaml
  • Loading branch information
pitkley authored Oct 29, 2024
2 parents 78417ce + f7b16b8 commit 1663648
Show file tree
Hide file tree
Showing 2 changed files with 133 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ jobs:
with:
command: test
args: --all --release
- name: validate example checkmate config
uses: actions-rs/cargo@v1
with:
command: run
args: lint --config-file checkmate.example.yaml

build-docker-image:
permissions:
Expand Down
128 changes: 128 additions & 0 deletions checkmate.example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
---
folders:
/:
title: Main
attributes:
labels:
checkmate/managed_by: checkmate
rulesets:
datasource_programs:
rules:
- id: some_custom_command
conditions:
host_labels:
- key: checkmate/datasource
operator: is
value: some_custom_command
properties:
description: >-
Use `some_custom_command` script to retrieve checkmk-compatible output for matching hosts
value_raw: >-
'some_custom_command $HOSTNAME$'
host_check_commands:
rules:
- id: some_custom_command
conditions:
host_labels:
- key: checkmate/datasource
operator: is
value: some_custom_command
properties:
description: >-
Verify outpost availability through healthcheck-endpoint using `some_custom_command` script
value_raw: >-
('custom', 'some_custom_command $HOSTNAME$')
periodic_discovery:
rules:
- id: autodiscover
conditions:
host_labels:
- key: checkmate/autodiscover
operator: is
value: 'true'
properties:
description: >-
Auto-discover and auto-vanish services for hosts with checkmate/autodiscover:true
value_raw: >-
{
'check_interval': 30.0,
'severity_unmonitored': 0,
'severity_vanished': 0,
'severity_new_host_label': 1,
'inventory_rediscovery': {
'mode': 2,
'group_time': 300,
'excluded_time': [],
'activation': True
}
}
service_contactgroups:
rules:
- id: all
properties:
description: >-
Assign all services to group
value_raw: >-
'SampleProject-ContactGroup-All'
- id: sampleproject_backend
conditions:
service_labels:
- key: team
operator: is
value: Backend
properties:
description: >-
Assign backend services to group
value_raw: >-
'SampleProject-ContactGroup-Backend'
/SampleProject:
title: Sample Project
attributes:
labels:
project: SP
checkmate/autodiscover: 'true'

/Integration:
title: SP - Integration Test Environment
attributes:
labels:
checkmate/environment: Integration
hosts:
- host_name: host1.int.domain.invalid
attributes:
entry_ipaddress: "127.0.0.1"
tag_criticality: test
tag_agent: cmk-agent
tag_address_family: ip-v4-only
- host_name: host2.int.domain.invalid
attributes:
entry_ipv6address: "::1"
labels:
service/language: python
service/framework: fastapi
tag_criticality: offline
tag_agent: all-agents
tag_address_family: ip-v6-only

/Production:
title: SP - Production Environment
attributes:
labels:
checkmate/environment: Production
hosts:
- host_name: host1.prod.domain.invalid
attributes:
entry_ipaddress: "127.0.0.1"
entry_ipv6address: "::1"
tag_criticality: prod
tag_agent: special-agents
tag_address_family: ip-v4v6
- host_name: host2.prod.domain.invalid
attributes:
labels:
service/language: python
service/framework: fastapi
tag_criticality: critical
tag_agent: no-agent
tag_address_family: no-ip

0 comments on commit 1663648

Please sign in to comment.