Browse Source
This migrates the afsmon script from puppet deploying on mirror-update.openstack.org to ansible deploying on mirror-update.opendev.org. There is nothing particularly special and this just a straight install with some minor dependencies. Since we have log publishing running on the opendev.org server, we publish the update logs alongside the others. Change-Id: Ifa3b4d59f8d0fc23a4492e50348bab30766d5779changes/67/707267/4
7 changed files with 80 additions and 37 deletions
@ -0,0 +1,8 @@
|
||||
afsmon |
||||
|
||||
Install the afsmon tool and related bits and pieces for periodic |
||||
monitoring of AFS volumes. This role is really only intended to be |
||||
run on the `mirror-update` host as we only need one instance of it |
||||
running. |
||||
|
||||
**Role Variables** |
@ -0,0 +1,17 @@
|
||||
[main] |
||||
# Enable debugging output |
||||
debug = True |
||||
|
||||
# If specified, all fileservers in this cell will be queried |
||||
cell = openstack.org |
||||
|
||||
# You can specify a specific list of fileservers. This is appended to |
||||
# the cell fileservers if present, otherwise is the canonical list |
||||
#fileservers = afs01.dfw.openstack.org |
||||
# fileserver02.afs.company.com |
||||
# fileserver03.afs.company.com |
||||
|
||||
# Options for remote statsd host if required |
||||
[statsd] |
||||
host = graphite.opendev.org |
||||
port = 8125 |
@ -0,0 +1,41 @@
|
||||
- name: Ensure afsmon log directory |
||||
file: |
||||
path: '/var/log/afsmon' |
||||
state: directory |
||||
owner: root |
||||
group: root |
||||
mode: 0755 |
||||
|
||||
- name: Install dependency packages |
||||
package: |
||||
name: |
||||
- python3-pbr |
||||
- python3-statsd |
||||
- python3-prettytable |
||||
state: present |
||||
|
||||
- name: Install afsmon |
||||
pip: |
||||
name: afsmon |
||||
state: present |
||||
executable: pip3 |
||||
|
||||
- name: Install configuration file |
||||
copy: |
||||
src: afsmon.cfg |
||||
dest: '/etc/' |
||||
mode: '0644' |
||||
|
||||
- name: Install afsmon cron job |
||||
cron: |
||||
name: 'afsmon' |
||||
state: present |
||||
job: '/usr/local/bin/afsmon statsd >> /var/log/afsmon/afsmon.log 2>&1' |
||||
hour: '*' |
||||
minute: '30' |
||||
|
||||
- name: Install logrotate rules |
||||
include_role: |
||||
name: logrotate |
||||
vars: |
||||
logrotate_file_name: '/var/log/afsmon/afsmon.log' |
Loading…
Reference in new issue