Skip to content
Snippets Groups Projects
Commit e41c7fec authored by Kerri Wait's avatar Kerri Wait Committed by Andreas Hamacher
Browse files

Telegraf monitoring for Karaage (hpc.erc.monash.edu.au)

parent 6e8dca7f
No related branches found
No related tags found
No related merge requests found
#!/bin/env python #!/bin/python -E
import json import json
import os import os
def render_data(data): def render_data(data):
return json.dumps(data) return json.dumps(data)
hw_counters = {} hw_counters = {}
path_prefix = '/sys/class/infiniband' path_prefix = '/sys/class/infiniband'
path_suffix = 'ports/1/hw_counters' path_suffix = 'ports/1/hw_counters'
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
- name: Download Telegraf package via URL [Debian/Ubuntu] - name: Download Telegraf package via URL [Debian/Ubuntu]
get_url: get_url:
url: "{{ telegraf_install_url }}" url: "{{ telegraf_install_deb_url }}"
dest: /tmp/telegraf-ansible-download.deb dest: /tmp/telegraf-ansible-download.deb
when: ansible_os_family == "Debian" when: ansible_os_family == "Debian"
become: true become: true
...@@ -22,21 +22,14 @@ ...@@ -22,21 +22,14 @@
become: true become: true
become_user: root become_user: root
- name: Create custom fact directory - name: Get list of hardware counters for interfaces
file: script: files/hw_counters.py
path: /etc/ansible/facts.d register: hwcounters
state: directory check_mode: no
become: true
- name: Insert custom fact file
copy:
src: files/hw_counters.fact
dest: /etc/ansible/facts.d/hw_counters.fact
mode: 0755
become: true
- name: reload ansible_local - name: Set hardware counters in facts
setup: filter=ansible_local set_fact:
hwcounterlist: "{{ hwcounters.stdout | from_json }}"
- name: Make a directory for extra files - name: Make a directory for extra files
file: file:
......
...@@ -201,6 +201,30 @@ ...@@ -201,6 +201,30 @@
{% endfor %} {% endfor %}
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if 'Karaage' in group_names %}
[[inputs.apache]]
interval = "60s"
# An array of URLs to gather from, must be directed at the machine
# readable version of the mod_status page including the auto query string.
# Default is "http://localhost/server-status?auto".
urls = ["http://localhost/server-status?auto"]
# Credentials for basic HTTP authentication.
# username = "myuser"
# password = "mypassword"
# Maximum time to receive response.
response_timeout = "5s"
# Optional TLS Config
# tls_ca = "/etc/telegraf/ca.pem"
# tls_cert = "/etc/telegraf/cert.pem"
# tls_key = "/etc/telegraf/key.pem"
# Use TLS but skip chain & host verification
# insecure_skip_verify = false
{% endif %}
############################################################################### ###############################################################################
# SERVICE INPUTS # # SERVICE INPUTS #
############################################################################### ###############################################################################
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment