Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
HPCasCode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hpc-team
HPCasCode
Commits
e41c7fec
Commit
e41c7fec
authored
4 years ago
by
Kerri Wait
Committed by
Andreas Hamacher
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Telegraf monitoring for Karaage (hpc.erc.monash.edu.au)
parent
6e8dca7f
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
roles/telegraf/files/hw_counters.py
+3
-1
3 additions, 1 deletion
roles/telegraf/files/hw_counters.py
roles/telegraf/tasks/main.yml
+8
-15
8 additions, 15 deletions
roles/telegraf/tasks/main.yml
roles/telegraf/templates/telegraf.conf.j2
+24
-0
24 additions, 0 deletions
roles/telegraf/templates/telegraf.conf.j2
with
35 additions
and
16 deletions
roles/telegraf/files/hw_counters.
fact
→
roles/telegraf/files/hw_counters.
py
100644 → 100755
+
3
−
1
View file @
e41c7fec
#!/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
'
...
...
This diff is collapsed.
Click to expand it.
roles/telegraf/tasks/main.yml
+
8
−
15
View file @
e41c7fec
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
roles/telegraf/templates/telegraf.conf.j2
+
24
−
0
View file @
e41c7fec
...
...
@@ -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 #
###############################################################################
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment