-
-
Save bhcopeland/b9768d8efde0ae036917 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
#!/usr/bin/ansible-playbook | |
--- | |
# Requires zabbix-api to be installed locally. | |
# To run the playbook locally run: ./zabbix_create_screens.sh -i hosts | |
# Run inside the playbook folder, to pick up correct vars | |
- name: Ensure zabbix screens exists | |
hosts: zabbix-server | |
gather_facts: false | |
tasks: | |
- name: Create a new screen for git hosts | |
local_action: | |
module: zabbix_screen | |
server_url: "https://{{zabbix_server_hostname}}" | |
login_user: "{{zabbix_api_username}}" | |
login_password: "{{zabbix_api_passwd}}" | |
screens: | |
- screen_name: Git Servers Utilization | |
state: present | |
host_group: Git Account | |
state: present | |
graph_names: | |
- CPU load | |
- CPU idle time | |
- CPU iowait | |
- Memory Usage | |
graph_width: 500 | |
graph_height: 100 | |
- name: Create git upload packs screen | |
local_action: | |
module: zabbix_screen | |
server_url: "https://{{zabbix_server_hostname}}" | |
login_user: "{{zabbix_api_username}}" | |
login_password: "{{zabbix_api_passwd}}" | |
screens: | |
- screen_name: Git Servers Upload Packs | |
state: present | |
host_group: Git Account | |
state: present | |
graph_names: | |
- git-upload-packs | |
graph_width: 500 | |
graph_height: 100 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment