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 os
def render_data(data):
return json.dumps(data)
hw_counters = {}
path_prefix = '/sys/class/infiniband'
path_suffix = 'ports/1/hw_counters'
......
......@@ -8,7 +8,7 @@
- name: Download Telegraf package via URL [Debian/Ubuntu]
get_url:
url: "{{ telegraf_install_url }}"
url: "{{ telegraf_install_deb_url }}"
dest: /tmp/telegraf-ansible-download.deb
when: ansible_os_family == "Debian"
become: true
......@@ -22,21 +22,14 @@
become: true
become_user: root
- name: Create custom fact directory
file:
path: /etc/ansible/facts.d
state: directory
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: Get list of hardware counters for interfaces
script: files/hw_counters.py
register: hwcounters
check_mode: no
- name: reload ansible_local
setup: filter=ansible_local
- name: Set hardware counters in facts
set_fact:
hwcounterlist: "{{ hwcounters.stdout | from_json }}"
- name: Make a directory for extra files
file:
......
......@@ -201,6 +201,30 @@
{% endfor %}
{% endfor %}
{% 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 #
###############################################################################
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