Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ jobs:

- run: pip install ansible

- run: ansible-playbook hack/plays/manage.yml
- run: ansible-playbook hack/playbooks/manage/manage.yaml

- run: git diff --exit-code
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
**/selinux/*.pp
site/
venv/
.var/lib/hackctl
39 changes: 35 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,51 @@ RaBe servers it soley regenerates README files and documentation.

### Regenerating READMEs

If you have obsah installed (e.g using pip), you can use the `hack/hackctl` script
to conveniently provide a help and store your recent args.

```bash
ansible-playbook hack/plays/manage.yml
pip install obsah

hack/hackctl manage --help
```

### Fetching Templates using ansible
NOTE: your args (like the API token) are persisted to the
`.var/lib/hackctl/parameters.yaml` file when you use hackctl.

If you prefer to use `ansible-playbook`, see below.

### Fetching Templates using hackctl

```bash
ansible-playbook hack/plays/manage.yml -e ansible_zabbix_auth_key=<AUTH_KEY>
hack/hackctl manage --ansible-zabbix-auth-key=<API_TOKEN>
```

If you just want to fetch a single template:

```bash
ansible-playbook hack/plays/manage.yml -e ansible_zabbix_auth_key=<AUTH_KEY> -e 'rabe_zabbix_templates=[{"template_name":"CHANGEME"}]'
hack/hackctl manage --ansible-zabbix-auth-key=<AUTH_KEY> --rabe-zabbix-templates='[{"template_name":"CHANGEME"}]'
```

To remove the API token from `.var/lib/hackctl/parameters.yaml` and rerun without fetching RaBe sources:

```bash
hack/hackctl manage --reset-ansible-zabbix-auth-key
```

### Fetching Templates using ansible


```bash
ansible-playbook hack/playbooks/manage/manage.yaml
```

```bash
ansible-playbook hack/playbooks/manage/manage.yaml -e ansible_zabbix_auth_key=<AUTH_KEY>
```

```bash
ansible-playbook hack/playbooks/manage/manage.yaml -e ansible_zabbix_auth_key=<AUTH_KEY> -e 'rabe_zabbix_templates=[{"template_name":"CHANGEME"}]'
```

### Adding new templates
Expand Down
2 changes: 1 addition & 1 deletion README.md

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

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

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

2 changes: 1 addition & 1 deletion Stacks/Applications/Songticker_Stack/7.0/README.md

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

2 changes: 1 addition & 1 deletion Stacks/Applications/systemd_Stack/7.0/README.md

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

2 changes: 1 addition & 1 deletion Stacks/Operating_systems/EL7_Stack/7.0/README.md

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

2 changes: 1 addition & 1 deletion Stacks/Operating_systems/EL8_Stack/7.0/README.md

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

2 changes: 1 addition & 1 deletion Stacks/Operating_systems/EL9_Stack/7.0/README.md

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

2 changes: 1 addition & 1 deletion Stacks/Servers/EL7_KVM_VM_Stack/7.0/README.md

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

2 changes: 1 addition & 1 deletion Stacks/Servers/EL8_KVM_VM_Stack/7.0/README.md

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

2 changes: 1 addition & 1 deletion Stacks/Servers/EL9_KVM_VM_Stack/7.0/README.md

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

2 changes: 1 addition & 1 deletion Stacks/Systems/APC_Smart-UPS_3000_Stack/7.0/README.md

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

2 changes: 1 addition & 1 deletion Templates/Applications/Cronie/7.0/README.md

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

2 changes: 1 addition & 1 deletion Templates/Applications/Directus_by_HTTP/7.0/README.md

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

2 changes: 1 addition & 1 deletion Templates/Applications/Songticker/7.0/README.md

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

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

2 changes: 1 addition & 1 deletion Templates/Applications/auditd/7.0/README.md

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

2 changes: 1 addition & 1 deletion Templates/Applications/candlepin-rhsmcertd/7.0/README.md

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

2 changes: 1 addition & 1 deletion Templates/Applications/certmonger/7.0/README.md

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

2 changes: 1 addition & 1 deletion Templates/Applications/chrony/7.0/README.md

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

2 changes: 1 addition & 1 deletion Templates/Applications/firewalld/7.0/README.md

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

2 changes: 1 addition & 1 deletion Templates/Applications/gssproxy/7.0/README.md

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

2 changes: 1 addition & 1 deletion Templates/Applications/qemu-ga/7.0/README.md

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

2 changes: 1 addition & 1 deletion Templates/Applications/qemu-ga_active/7.0/README.md

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

2 changes: 1 addition & 1 deletion Templates/Applications/rpc.gssd/7.0/README.md

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

2 changes: 1 addition & 1 deletion Templates/Applications/rsyslog/7.0/README.md

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

2 changes: 1 addition & 1 deletion Templates/Applications/sssd/7.0/README.md

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

2 changes: 1 addition & 1 deletion Templates/Applications/systemd-journald/7.0/README.md

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

2 changes: 1 addition & 1 deletion Templates/Applications/systemd-logind/7.0/README.md

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

2 changes: 1 addition & 1 deletion Templates/Applications/systemd-udevd/7.0/README.md

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

2 changes: 1 addition & 1 deletion Templates/Applications/timedatectl/7.0/README.md

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

2 changes: 1 addition & 1 deletion Templates/Applications/tuned/7.0/README.md

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

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ zabbix_export:
- name: 'Templates/Network devices'
items:
- uuid: 9e2e8706b8e4496e80d15bc420401b97
name: 'GS Hardware serial number'
name: 'Netgear Fastpath: Hardware serial number'
type: SNMP_AGENT
# the upstream template uses the oid 1.3.6.1.4.1.4526.10.1.1.1.4.0
# the following line is the main reason to add a GS template on top
Expand All @@ -47,8 +47,8 @@ zabbix_export:
triggers:
- uuid: 9b30371ec844436ab1456ba571ca74d0
expression: 'last(/Netgear GS by SNMP/rabe.system.hw.serialnumber,#1)<>last(/Netgear GS by SNMP/rabe.system.hw.serialnumber,#2) and length(last(/Netgear GS by SNMP/rabe.system.hw.serialnumber))>0'
name: 'GS Device has been replaced'
event_name: 'GS Device has been replaced (new serial number received)'
name: 'RaBe: Netgear Fastpath: Device has been replaced'
event_name: 'RaBe: Netgear Fastpath: Device has been replaced (new serial number received)'
priority: INFO
description: 'Device serial number has changed. Acknowledge to close the problem manually.'
manual_close: 'YES'
Expand Down
6 changes: 3 additions & 3 deletions Templates/Network_devices/Netgear_GS_by_SNMP/7.0/README.md

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

4 changes: 2 additions & 2 deletions catalog-info.yaml

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

14 changes: 14 additions & 0 deletions hack/hackctl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

OBSAH_NAME=hack/hackctl
OBSAH_BASE=$(dirname $(readlink -f $0))/..
OBSAH_DATA=${OBSAH_BASE}/hack
OBSAH_INVENTORY=${OBSAH_BASE}/hack/inventories
OBSAH_STATE=${OBSAH_BASE}/.var/lib/hackctl
OBSAH_PERSIST_PARAMS=true
export OBSAH_NAME OBSAH_DATA OBSAH_INVENTORY OBSAH_STATE OBSAH_PERSIST_PARAMS

ANSIBLE_LOG_PATH=${OBSAH_BASE}/.var/lib/hackctl/ansible.log
export ANSIBLE_LOG_PATH

exec obsah "$@"
1 change: 1 addition & 0 deletions hack/inventories/localhost
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
localhost ansible_connection=local
Loading