Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
manage snmpd with salt
snmp_ro_community: xxxxxxx
snmp_management_station: 10.0.0.1
syslocation YOUR LoCATION
syscontact YOUR CONTACT
rocommunity {{ pillar['snmp_ro_community'] }} {{ pillar['snmp_management_station'] }}
ignoreDisk ram*
ignoreDisk loop*
ignoreDisk fd*
ignoreDisk md*
ignoreDisk /proc
ignoreDisk /proc/*
ignoreDisk /sys
ignoreDisk /dev/*
ignoreDisk /var/lib/nfs/rpc_pipefs
includeAllDisks 10%
# snmpd command line options
OPTIONS="-LS 0-4 d -Lf /dev/null -p /var/run/snmpd.pid"
net-snmp:
pkg:
- installed
service:
- name: snmpd
- running
- require:
- pkg: net-snmp
/etc/snmp/snmpd.conf:
file.managed:
- source: salt://files/snmpd.conf
- user: root
- group: root
- mode: 644
- template: jinja
- require:
- pkg: net-snmp
- watch_in:
- service: snmpd
/etc/sysconfig/snmpd.options:
file.managed:
- source: salt://files/snmpd.options
- user: root
- group: root
- mode: 644
- template: jinja
- require:
- pkg: net-snmp
- watch_in:
- service: snmpd
snmpd:
service.running:
- enable: True
- reload: True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment