Created
April 1, 2026 15:34
-
-
Save broguinn/47241e6350c6b58268f7a68b941e5f3f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/infra/ansible/inventory/group_vars/bna1/zabbix.yml b/infra/ansible/inventory/group_vars/bna1/zabbix.yml | |
| index e978c22..31387f6 100644 | |
| --- a/infra/ansible/inventory/group_vars/bna1/zabbix.yml | |
| +++ b/infra/ansible/inventory/group_vars/bna1/zabbix.yml | |
| @@ -138,8 +138,5 @@ ups_defaults: | |
| groups: ["BNA1 Power", "BNA1", "Power"] | |
| templates: ["CyberPower Cloud UPS"] | |
| interface_type: agent # An interface is required, but not used for API calls | |
| - macros: | |
| - - macro: '{$CYBERPOWER_API_TOKEN}' | |
| - value: "{{ cyberpower_api_token }}" | |
| zabbix_monitored_devices: "{{ zabbix_base_devices + zabbix_servers + (zabbix_nvr_windows_devices | map('combine', nvr_windows_defaults) | list) + (zabbix_nvr_linux_devices | map('combine', nvr_linux_defaults) | list) + (zabbix_cameras | selectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', lane_camera_defaults) | list) + (zabbix_cameras | rejectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', yard_camera_defaults) | list) + (zabbix_intercoms | map('combine', intercom_defaults) | list) + (zabbix_ups_devices | map('combine', ups_defaults) | list) }}" | |
| diff --git a/infra/ansible/inventory/group_vars/cmh2/zabbix.yml b/infra/ansible/inventory/group_vars/cmh2/zabbix.yml | |
| index 5cc692d..23d6320 100644 | |
| --- a/infra/ansible/inventory/group_vars/cmh2/zabbix.yml | |
| +++ b/infra/ansible/inventory/group_vars/cmh2/zabbix.yml | |
| @@ -92,8 +92,6 @@ ups_defaults: | |
| groups: ["CMH2 Power", "CMH2", "Power"] | |
| templates: ["CyberPower Cloud UPS"] | |
| interface_type: agent # An interface is required, but not used for API calls | |
| - macros: | |
| - - macro: '{$CYBERPOWER_API_TOKEN}' | |
| - value: "{{ cyberpower_api_token }}" | |
| + | |
| zabbix_monitored_devices: "{{ zabbix_base_devices + zabbix_servers + (zabbix_nvr_windows_devices | map('combine', nvr_windows_defaults) | list) + (zabbix_nvr_linux_devices | map('combine', nvr_linux_defaults) | list) + (zabbix_cameras | selectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', lane_camera_defaults) | list) + (zabbix_cameras | rejectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', yard_camera_defaults) | list) + (zabbix_intercoms | map('combine', intercom_defaults) | list) + (zabbix_ups_devices | map('combine', ups_defaults) | list) }}" | |
| diff --git a/infra/ansible/inventory/group_vars/dfw2/zabbix.yml b/infra/ansible/inventory/group_vars/dfw2/zabbix.yml | |
| index ede7ead..8385174 100644 | |
| --- a/infra/ansible/inventory/group_vars/dfw2/zabbix.yml | |
| +++ b/infra/ansible/inventory/group_vars/dfw2/zabbix.yml | |
| @@ -87,8 +87,6 @@ ups_defaults: | |
| groups: ["DFW2 Power", "DFW2", "Power"] | |
| templates: ["CyberPower Cloud UPS"] | |
| interface_type: agent # An interface is required, but not used for API calls | |
| - macros: | |
| - - macro: '{$CYBERPOWER_API_TOKEN}' | |
| - value: "{{ cyberpower_api_token }}" | |
| + | |
| zabbix_monitored_devices: "{{ zabbix_base_devices + zabbix_servers + (zabbix_nvr_windows_devices | map('combine', nvr_windows_defaults) | list) + (zabbix_nvr_linux_devices | map('combine', nvr_linux_defaults) | list) + (zabbix_cameras | selectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', lane_camera_defaults) | list) + (zabbix_cameras | rejectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', yard_camera_defaults) | list) + (zabbix_intercoms | map('combine', intercom_defaults) | list) + (zabbix_ups_devices | map('combine', ups_defaults) | list) }}" | |
| diff --git a/infra/ansible/inventory/group_vars/dfw3/zabbix.yml b/infra/ansible/inventory/group_vars/dfw3/zabbix.yml | |
| index b2a537c..f255942 100644 | |
| --- a/infra/ansible/inventory/group_vars/dfw3/zabbix.yml | |
| +++ b/infra/ansible/inventory/group_vars/dfw3/zabbix.yml | |
| @@ -118,9 +118,7 @@ ups_defaults: | |
| groups: ["DFW3 Power", "DFW3", "Power"] | |
| templates: ["CyberPower Cloud UPS"] | |
| interface_type: agent # An interface is required, but not used for API calls | |
| - macros: | |
| - - macro: '{$CYBERPOWER_API_TOKEN}' | |
| - value: "{{ cyberpower_api_token }}" | |
| + | |
| # This is the final list of all devices to be monitored at the site. | |
| # It is constructed by combining the base devices, cameras, and intercoms, | |
| diff --git a/infra/ansible/inventory/group_vars/dfw4/zabbix.yml b/infra/ansible/inventory/group_vars/dfw4/zabbix.yml | |
| index 6520d0b..6685756 100644 | |
| --- a/infra/ansible/inventory/group_vars/dfw4/zabbix.yml | |
| +++ b/infra/ansible/inventory/group_vars/dfw4/zabbix.yml | |
| @@ -107,8 +107,6 @@ ups_defaults: | |
| groups: ["DFW4 Power", "DFW4", "Power"] | |
| templates: ["CyberPower Cloud UPS"] | |
| interface_type: agent # An interface is required, but not used for API calls | |
| - macros: | |
| - - macro: '{$CYBERPOWER_API_TOKEN}' | |
| - value: "{{ cyberpower_api_token }}" | |
| + | |
| zabbix_monitored_devices: "{{ zabbix_base_devices + zabbix_servers + (zabbix_nvr_windows_devices | map('combine', nvr_windows_defaults) | list) + (zabbix_nvr_linux_devices | map('combine', nvr_linux_defaults) | list) + (zabbix_cameras | selectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', lane_camera_defaults) | list) + (zabbix_cameras | rejectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', yard_camera_defaults) | list) + (zabbix_intercoms | map('combine', intercom_defaults) | list) + (zabbix_ups_devices | map('combine', ups_defaults) | list) }}" | |
| diff --git a/infra/ansible/inventory/group_vars/hou1/zabbix.yml b/infra/ansible/inventory/group_vars/hou1/zabbix.yml | |
| index 538e34c..4a105df 100644 | |
| --- a/infra/ansible/inventory/group_vars/hou1/zabbix.yml | |
| +++ b/infra/ansible/inventory/group_vars/hou1/zabbix.yml | |
| @@ -111,8 +111,6 @@ ups_defaults: | |
| groups: ["HOU1 Power", "HOU1", "Power"] | |
| templates: ["CyberPower Cloud UPS"] | |
| interface_type: agent # An interface is required, but not used for API calls | |
| - macros: | |
| - - macro: '{$CYBERPOWER_API_TOKEN}' | |
| - value: "{{ cyberpower_api_token }}" | |
| + | |
| zabbix_monitored_devices: "{{ zabbix_base_devices + zabbix_servers + (zabbix_nvr_windows_devices | map('combine', nvr_windows_defaults) | list) + (zabbix_nvr_linux_devices | map('combine', nvr_linux_defaults) | list) + (zabbix_cameras | selectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', lane_camera_defaults) | list) + (zabbix_cameras | rejectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', yard_camera_defaults) | list) + (zabbix_intercoms | map('combine', intercom_defaults) | list) + (zabbix_ups_devices | map('combine', ups_defaults) | list) }}" | |
| diff --git a/infra/ansible/inventory/group_vars/hou2/zabbix.yml b/infra/ansible/inventory/group_vars/hou2/zabbix.yml | |
| index 2b32fda..8b6774f 100644 | |
| --- a/infra/ansible/inventory/group_vars/hou2/zabbix.yml | |
| +++ b/infra/ansible/inventory/group_vars/hou2/zabbix.yml | |
| @@ -109,8 +109,6 @@ ups_defaults: | |
| groups: ["HOU2 Power", "HOU2", "Power"] | |
| templates: ["CyberPower Cloud UPS"] | |
| interface_type: agent # An interface is required, but not used for API calls | |
| - macros: | |
| - - macro: '{$CYBERPOWER_API_TOKEN}' | |
| - value: "{{ cyberpower_api_token }}" | |
| + | |
| zabbix_monitored_devices: "{{ zabbix_base_devices + zabbix_servers + (zabbix_nvr_windows_devices | map('combine', nvr_windows_defaults) | list) + (zabbix_nvr_linux_devices | map('combine', nvr_linux_defaults) | list) + (zabbix_cameras | selectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', lane_camera_defaults) | list) + (zabbix_cameras | rejectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', yard_camera_defaults) | list) + (zabbix_intercoms | map('combine', intercom_defaults) | list) + (zabbix_ups_devices | map('combine', ups_defaults) | list) }}" | |
| diff --git a/infra/ansible/inventory/group_vars/ind1/zabbix.yml b/infra/ansible/inventory/group_vars/ind1/zabbix.yml | |
| index db49f55..f5a1fa5 100644 | |
| --- a/infra/ansible/inventory/group_vars/ind1/zabbix.yml | |
| +++ b/infra/ansible/inventory/group_vars/ind1/zabbix.yml | |
| @@ -112,8 +112,6 @@ ups_defaults: | |
| groups: ["IND1 Power", "IND1", "Power"] | |
| templates: ["CyberPower Cloud UPS"] | |
| interface_type: agent # An interface is required, but not used for API calls | |
| - macros: | |
| - - macro: '{$CYBERPOWER_API_TOKEN}' | |
| - value: "{{ cyberpower_api_token }}" | |
| + | |
| zabbix_monitored_devices: "{{ zabbix_base_devices + zabbix_servers + (zabbix_nvr_windows_devices | map('combine', nvr_windows_defaults) | list) + (zabbix_nvr_linux_devices | map('combine', nvr_linux_defaults) | list) + (zabbix_cameras | selectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', lane_camera_defaults) | list) + (zabbix_cameras | rejectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', yard_camera_defaults) | list) + (zabbix_intercoms | map('combine', intercom_defaults) | list) + (zabbix_ups_devices | map('combine', ups_defaults) | list) }}" | |
| diff --git a/infra/ansible/inventory/group_vars/mem4/zabbix.yml b/infra/ansible/inventory/group_vars/mem4/zabbix.yml | |
| index 6772dc3..2dcd9ba 100644 | |
| --- a/infra/ansible/inventory/group_vars/mem4/zabbix.yml | |
| +++ b/infra/ansible/inventory/group_vars/mem4/zabbix.yml | |
| @@ -91,8 +91,6 @@ ups_defaults: | |
| groups: ["MEM4 Power", "MEM4", "Power"] | |
| templates: ["CyberPower Cloud UPS"] | |
| interface_type: agent # An interface is required, but not used for API calls | |
| - macros: | |
| - - macro: '{$CYBERPOWER_API_TOKEN}' | |
| - value: "{{ cyberpower_api_token }}" | |
| + | |
| zabbix_monitored_devices: "{{ zabbix_base_devices + zabbix_servers + (zabbix_nvr_windows_devices | map('combine', nvr_windows_defaults) | list) + (zabbix_nvr_linux_devices | map('combine', nvr_linux_defaults) | list) + (zabbix_cameras | selectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', lane_camera_defaults) | list) + (zabbix_cameras | rejectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', yard_camera_defaults) | list) + (zabbix_intercoms | map('combine', intercom_defaults) | list) + (zabbix_ups_devices | map('combine', ups_defaults) | list) }}" | |
| diff --git a/infra/ansible/inventory/group_vars/ord2/zabbix.yml b/infra/ansible/inventory/group_vars/ord2/zabbix.yml | |
| index f9ef3fe..90fbc61 100644 | |
| --- a/infra/ansible/inventory/group_vars/ord2/zabbix.yml | |
| +++ b/infra/ansible/inventory/group_vars/ord2/zabbix.yml | |
| @@ -140,8 +140,6 @@ ups_defaults: | |
| groups: ["ORD2 Power", "ORD2", "Power"] | |
| templates: ["CyberPower Cloud UPS"] | |
| interface_type: agent # An interface is required, but not used for API calls | |
| - macros: | |
| - - macro: '{$CYBERPOWER_API_TOKEN}' | |
| - value: "{{ cyberpower_api_token }}" | |
| + | |
| zabbix_monitored_devices: "{{ zabbix_base_devices + zabbix_servers + (zabbix_nvr_windows_devices | map('combine', nvr_windows_defaults) | list) + (zabbix_nvr_linux_devices | map('combine', nvr_linux_defaults) | list) + (zabbix_cameras | selectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', lane_camera_defaults) | list) + (zabbix_cameras | rejectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', yard_camera_defaults) | list) + (zabbix_intercoms | map('combine', intercom_defaults) | list) + (zabbix_ups_devices | map('combine', ups_defaults) | list) }}" | |
| diff --git a/infra/ansible/inventory/group_vars/pdx4/zabbix.yml b/infra/ansible/inventory/group_vars/pdx4/zabbix.yml | |
| index fb74a1e..701b1ee 100644 | |
| --- a/infra/ansible/inventory/group_vars/pdx4/zabbix.yml | |
| +++ b/infra/ansible/inventory/group_vars/pdx4/zabbix.yml | |
| @@ -107,8 +107,6 @@ ups_defaults: | |
| groups: ["PDX4 Power", "PDX4", "Power"] | |
| templates: ["CyberPower Cloud UPS"] | |
| interface_type: agent # An interface is required, but not used for API calls | |
| - macros: | |
| - - macro: '{$CYBERPOWER_API_TOKEN}' | |
| - value: "{{ cyberpower_api_token }}" | |
| + | |
| zabbix_monitored_devices: "{{ zabbix_base_devices + zabbix_servers + (zabbix_nvr_windows_devices | map('combine', nvr_windows_defaults) | list) + (zabbix_nvr_linux_devices | map('combine', nvr_linux_defaults) | list) + (zabbix_cameras | selectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', lane_camera_defaults) | list) + (zabbix_cameras | rejectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', yard_camera_defaults) | list) + (zabbix_intercoms | map('combine', intercom_defaults) | list) + (zabbix_ups_devices | map('combine', ups_defaults) | list) }}" | |
| diff --git a/infra/ansible/inventory/group_vars/phx3/zabbix.yml b/infra/ansible/inventory/group_vars/phx3/zabbix.yml | |
| index 1a2284a..e2da260 100644 | |
| --- a/infra/ansible/inventory/group_vars/phx3/zabbix.yml | |
| +++ b/infra/ansible/inventory/group_vars/phx3/zabbix.yml | |
| @@ -125,8 +125,6 @@ ups_defaults: | |
| groups: ["PHX3 Power", "PHX3", "Power"] | |
| templates: ["CyberPower Cloud UPS"] | |
| interface_type: agent # An interface is required, but not used for API calls | |
| - macros: | |
| - - macro: '{$CYBERPOWER_API_TOKEN}' | |
| - value: "{{ cyberpower_api_token }}" | |
| + | |
| zabbix_monitored_devices: "{{ zabbix_base_devices + zabbix_servers + (zabbix_nvr_windows_devices | map('combine', nvr_windows_defaults) | list) + (zabbix_nvr_linux_devices | map('combine', nvr_linux_defaults) | list) + (zabbix_cameras | selectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', lane_camera_defaults) | list) + (zabbix_cameras | rejectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', yard_camera_defaults) | list) + (zabbix_intercoms | map('combine', intercom_defaults) | list) + (zabbix_ups_devices | map('combine', ups_defaults) | list) }}" | |
| diff --git a/infra/ansible/inventory/group_vars/sat1/zabbix.yml b/infra/ansible/inventory/group_vars/sat1/zabbix.yml | |
| index cd81573..cad35b8 100644 | |
| --- a/infra/ansible/inventory/group_vars/sat1/zabbix.yml | |
| +++ b/infra/ansible/inventory/group_vars/sat1/zabbix.yml | |
| @@ -103,8 +103,6 @@ ups_defaults: | |
| groups: ["SAT1 Power", "SAT1", "Power"] | |
| templates: ["CyberPower Cloud UPS"] | |
| interface_type: agent # An interface is required, but not used for API calls | |
| - macros: | |
| - - macro: '{$CYBERPOWER_API_TOKEN}' | |
| - value: "{{ cyberpower_api_token }}" | |
| + | |
| zabbix_monitored_devices: "{{ zabbix_base_devices + zabbix_servers + (zabbix_nvr_windows_devices | map('combine', nvr_windows_defaults) | list) + (zabbix_nvr_linux_devices | map('combine', nvr_linux_defaults) | list) + (zabbix_cameras | selectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', lane_camera_defaults) | list) + (zabbix_cameras | rejectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', yard_camera_defaults) | list) + (zabbix_intercoms | map('combine', intercom_defaults) | list) + (zabbix_ups_devices | map('combine', ups_defaults) | list) }}" | |
| diff --git a/infra/ansible/inventory/group_vars/slc1/zabbix.yml b/infra/ansible/inventory/group_vars/slc1/zabbix.yml | |
| index d7f6484..7d9a8fc 100644 | |
| --- a/infra/ansible/inventory/group_vars/slc1/zabbix.yml | |
| +++ b/infra/ansible/inventory/group_vars/slc1/zabbix.yml | |
| @@ -101,8 +101,6 @@ ups_defaults: | |
| groups: ["SLC1 Power", "SLC1", "Power"] | |
| templates: ["CyberPower Cloud UPS"] | |
| interface_type: agent # An interface is required, but not used for API calls | |
| - macros: | |
| - - macro: '{$CYBERPOWER_API_TOKEN}' | |
| - value: "{{ cyberpower_api_token }}" | |
| + | |
| zabbix_monitored_devices: "{{ zabbix_base_devices + zabbix_servers + (zabbix_nvr_windows_devices | map('combine', nvr_windows_defaults) | list) + (zabbix_nvr_linux_devices | map('combine', nvr_linux_defaults) | list) + (zabbix_cameras | selectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', lane_camera_defaults) | list) + (zabbix_cameras | rejectattr('name', 'search', 'Entrance|Entry|Exit') | map('combine', yard_camera_defaults) | list) + (zabbix_intercoms | map('combine', intercom_defaults) | list) + (zabbix_ups_devices | map('combine', ups_defaults) | list) }}" | |
| diff --git a/infra/ansible/roles/zabbix_config/templates/cyberpower_ups_template.yaml b/infra/ansible/roles/zabbix_config/templates/cyberpower_ups_template.yaml | |
| index 533745e..a7be26e 100644 | |
| --- a/infra/ansible/roles/zabbix_config/templates/cyberpower_ups_template.yaml | |
| +++ b/infra/ansible/roles/zabbix_config/templates/cyberpower_ups_template.yaml | |
| @@ -10,9 +10,6 @@ zabbix_export: | |
| description: 'Template for monitoring basic details of CyberPower UPS devices' | |
| groups: | |
| - name: Templates/Power | |
| - macros: | |
| - - macro: '{$CYBERPOWER_API_TOKEN}' | |
| - value: '' | |
| valuemaps: | |
| - uuid: 58af494f638347ba896127f5e507e001 | |
| name: 'CyberPower Device Status Value Mapping' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment