Commit Graph

114 Commits

Author SHA1 Message Date
Greg Sutcliffe
1f472c9754 Zabbix: improve tagging and make sure Ping Hosts are in All Hosts
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-07-31 14:32:18 +01:00
Greg Sutcliffe
b4651f8b5b Zabbix: Add method to define ping-only hosts in host_vars
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-07-31 12:52:04 +01:00
Greg Sutcliffe
a1b2783a67 Zabbix: ensure existence of correct hostgroups
also applies the correct hostgroups when creating/updating hosts

Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-07-31 12:51:43 +01:00
Greg Sutcliffe
e332937c54 Zabbix: template updates
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-07-30 16:37:24 +01:00
Greg Sutcliffe
5fb8726bcd Zabbix: Add zabbix_agent tag to API host-creation tasks
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-07-30 10:50:46 +01:00
Greg Sutcliffe
24bab53bbb Zabbix: remove incorrect leftover delegate_to
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-07-23 13:47:58 +01:00
Greg Sutcliffe
ffbb5e8777 Zabbix: Override package list for Zabbix server
The server uses the upstream release RPM, not EPEL, so
the package names are different. Our pattern for OS vars
override host_vars, so we have to explictly set an override var

Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-07-23 11:12:34 +01:00
Greg Sutcliffe
9eda8d8508 Zabbix: Drop autoreg, move PSK config to the host entry
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-07-23 10:51:37 +01:00
Greg Sutcliffe
0f7d5cb568 Zabbix: Revert change to agent path, settling on EPEL agent packages
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-07-23 10:38:55 +01:00
Greg Sutcliffe
b3c29a7d76 Zabbix: use internal host for the agent, not the API host
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-07-23 10:24:11 +01:00
Greg Sutcliffe
76b7e1289e Zabbix: use EPEL/Fedora package names for the zabbix-agent
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-07-23 10:12:42 +01:00
Greg Sutcliffe
985f5e5608 Zabbix: Correct agent conf file location for RHEL9
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-07-22 16:41:18 +01:00
Greg Sutcliffe
d9108c43b3 Zabbix: update agent package lists for newer packages
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-07-22 16:35:16 +01:00
Greg Sutcliffe
75609617d3 Zabbix: Cleanup, defaults, and MGMT interface items
Fairly big commit, this does:
- Any host including zabbix_agent will now register iteself with the server
  This means we can drop auto-registration once it's tested
- Any host with a "bmc:" entry in host_vars will add items/triggers to monitor it
  This means we don't need separate "hosts" for the MGMT interfaces
- Reverted to a single base template
  The split ones were overkill, we can handle the builders with host macros
- Added defaults to the roles
  This lets us override the connection vars from host/group vars (useful for testing)
- Lint & minor cleanup

Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-07-22 16:23:21 +01:00
Greg Sutcliffe
9c0311e50e Zabbix: Move templates to the first item, as they are dependencies
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-07-17 15:55:11 +01:00
Greg Sutcliffe
c92b966d9e Zabbix: Add new NOC usergroup, configure SAML better
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-07-17 12:56:20 +01:00
Greg Sutcliffe
1c9623a923 Zabbix: Use correct IDP/SAML urls and typo fixes
Also add a tag to the whole role so it can be easily selected in the playbook

Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-07-17 12:36:29 +01:00
Greg Sutcliffe
f988af3e97 Zabbix: Add SAML config and cleanup older stuff
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-07-17 12:20:23 +01:00
Greg Sutcliffe
a26d68ebec Zabbix: Refactor sync-noc-membership and add zabbix-agent to server playbook
Signed-off-by: Greg Sutcliffe <fedora@emeraldreverie.org>
2025-07-15 12:29:51 +01:00
James Antill
ea5ca95c57 Change iad2 things to rdu3 for zabbix. Namely haproxy/agent.
Signed-off-by: James Antill <james@and.org>
2025-07-01 13:29:08 -04:00
James Antill
ad44f5d6e5 zabbix: Hopefully workaround custom_template conditional.
Signed-off-by: James Antill <james@and.org>
2025-06-20 12:28:23 -04:00
Kevin Fenzi
60c4bdd9d0 zabbix / templates: just use inventory_hostname not short
This causes an issue where we have a proxy01.iad2 and a proxy01.rdu3.
They are different hosts, but if it uses the short name then the second
one fails because it has the same name as the first.

Lets just use fqdn for now and see if causes any problems in
display in the interface. If it does, we can change it to
perhaps include the second octet.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-05-28 15:48:03 -07:00
Greg Sutcliffe
634f70c457 Zabbix-stg: Enable setting host-level overrides to template macros 2025-05-01 15:06:17 +01:00
Greg Sutcliffe
3965fb9a04 zabbix-stg: add missing tag to needed set_fact 2025-04-29 20:46:37 +01:00
Greg Sutcliffe
0e60fc6eaf Zabbix-stg: bump collection to 3.3.0 and re-enable user 2025-04-24 17:29:01 +00:00
Greg Sutcliffe
f5475063e6 Zabbix-stg: disable user-management until we can upgrade to 3.3.0 2025-04-04 16:31:47 +01:00
Greg Sutcliffe
655f2dc58f Zabbix-stg: minor fixes to API config 2025-04-04 12:25:57 +00:00
Greg Sutcliffe
7f60fdf690 Zabbix-stg: More base server config
This adds:
- Matrix media type
- User for a Matrix bot
- Trigger using Matrix & the bot
- PSK configuration, using the PSK file already deployed
- 2 base templates
  - a general one suitable even for Koji
  - a dependant one for all other hosts
- Autoregistration config to use the new base template

This is all scoped to staging via a new include in main.yml
2025-04-02 17:30:59 +01:00
Mark Rosenbaum
2e078cde1c Update roles/zabbix/zabbix_server/tasks/install.yml - Updating Zabbix prod to 7.0LTS
Signed-off-by: Mark Rosenbaum markrosenbaum@fedoraproject.org
2025-03-14 16:18:35 +00:00
Mark Rosenbaum
01f5e19cf6 Update roles/zabbix/zabbix_server/tasks/install.yml - Seperated Prod and Stg
Prod gets the same version it already has(6.0 LTS) and Stg now gets 7.0 LTS
2025-03-14 14:29:14 +00:00
Mark Rosenbaum
81ee6adbe2 Update roles/zabbix/zabbix_server/tasks/install.yml - rpm install 6.0LTS to rpm install 7.0LTS 2025-03-14 14:29:14 +00:00
Michal Konecny
2ec055db6f Use first uppercase letter for all handlers
This will unify all the handlers to use first uppercase letter for
ansible-lint to stop complaining.

I went through all `notify:` occurrences and fixed them by running
```
set TEXT "text_to_replace"; set REPLACEMENT "replacement_text"; git grep
-rlz "$TEXT" . | xargs -0 sed -i "s/$TEXT/$REPLACEMENT/g"
```

Then I went through all the changes and removed the ones that wasn't
expected to be changed.

Fixes https://pagure.io/fedora-infrastructure/issue/12391

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-02-10 20:31:49 +00:00
Ryan Lerch
47c68f478d ansiblelint fixes - fqcn[action-core] - template to ansible.builtin.template
Replaces references to template: with ansible.builtin.template

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:30:29 +10:00
Ryan Lerch
3c41882bb0 ansiblelint fixes - fqcn[action-core] - shell to ansible.builtin.shell
Replaces references to shell: with ansible.builtin.shell

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:29:10 +10:00
Ryan Lerch
462176464b ansiblelint fixes-- fqcn[action-core] - command to ansible.builtin.command
Replaces many references to  command: with ansible.builtin.command

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:26:47 +10:00
Ryan Lerch
6a3816dfdc ansiblelint fixes-- fqcn[action-core] - copy to ansible.builtin.copy
Replaces many references to 'copy' with ansible.builtin.copy

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 10:43:31 +10:00
Ryan Lerch
62952df107 ansiblelint fixes-- fqcn[action-core] - file to ansible.builtin.file
Replaces many references to  file: with ansible.builtin.file

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 10:41:52 +10:00
Ryan Lerch
691adee6ee Fix name[casing] ansible-lint issues
fix 1900 failures of the following case issue:

`name[casing]: All names should start with an uppercase letter.`

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-14 20:20:07 +10:00
Kevin Fenzi
e26f6acacf releng: drop clean-ami's job
This job was used to cleanup old ami's from fedimg.
It then reported to a pagure project about what it did.
However, it's token has been expired and it no longer needs to exist.
Garbage collection of ami's should take place in the new
cloud-image-uploader (well, it marks when things are eol).
So, lets just remove this old and nolonger needed cron.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-12-05 14:05:47 -08:00
David Kirwan
041ac34bc2 update zabbix 6.0 LTS to latest
Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
2024-12-02 11:28:44 +00:00
Ryan Lerch
89f6f1fc32 Fix majority of remaining yamllint warnings and errors
Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2024-11-28 17:31:45 +10:00
Kevin Fenzi
967dc9ab91 zabbix: drop changes to /run dir
This was just added to help debug some startup problems, so we can drop
it now. Also, it causes the playbook to be non idempotent (ie, this task
runs and changes everytime the playbook it run, causing a lot of noise
in the check/diff runs).
/run/zabbix should get created by systemd, so no need to muck with it.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-10-09 08:52:25 -07:00
Jiri Podivin
f513e7cbcd Linting python scripts
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
2024-09-18 19:57:29 +00:00
David Kirwan
cb77d694fe zabbix: move postgresql configuration to files rather than templates
Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
2024-05-16 11:39:16 +01:00
David Kirwan
c7100e0259 zabbix: remove runonce flag from zabbix hostgroup creation task
Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
2024-05-16 09:30:41 +01:00
David Kirwan
66defc189e zabbix: attach monitoring template to rabbitmq
Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
2024-05-16 09:22:21 +01:00
David Kirwan
321edb65cc zabbix: external hosts http check updating config
Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
2024-04-29 12:05:12 +01:00
David Kirwan
81ffe56f4a zabbix: move https to http for proxies template
Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
2024-04-25 12:51:32 +01:00
David Kirwan
4cfba84485 zabbix: retag tasks in zabbix_templates role
Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
2024-04-25 12:17:52 +01:00
David Kirwan
0551f3f343 zabbix: add clearer ansible tags on zabbix_template role tasks
Signed-off-by: David Kirwan <davidkirwanirl@gmail.com>
2024-04-25 11:58:40 +01:00