Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ Pillar values used under `collectd.plugins.java`, an example ::
port: 39999
user: 'someuser' (optional)
group: 'someuser' (optional)
prefix: 'someprefix-' (optional)
lib: '/some/file' (optional)
tomcat: true (optional)

Expand Down Expand Up @@ -136,6 +137,11 @@ Enables and configures the ntpd plugin.

This state is used to install OS packages collectd plugins depend on.

``collectd.perl``
-----------------------

Enables and configures the perl plugin.

``collectd.postgresql``
-----------------------

Expand Down
4 changes: 4 additions & 0 deletions collectd/files/java.conf
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ LoadPlugin java
{%- if collectd_settings.plugins.java.password is defined and collectd_settings.plugins.java.password %}
Password "{{ pass }}"
{%- endif %}

{%- if collectd_settings.plugins.java.prefix is defined and collectd_settings.plugins.java.prefix %}
InstancePrefix "{{ collectd_settings.plugins.java.prefix }}"
{%- endif %}
Host "{{ collectd_settings.plugins.java.host }}"
Collect "classes"
Collect "compilation"
Expand Down
18 changes: 18 additions & 0 deletions collectd/files/perl.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{%- from "collectd/map.jinja" import collectd_settings with context -%}

#
# DO NOT EDIT
#
# This file is managed by salt via {{ source }}
# Modify the config that generates this file instead
#

LoadPlugin perl

<Plugin "perl">
IncludeDir "{{ collectd_settings.plugins.perl.includedir }}"
BaseName "{{ collectd_settings.plugins.perl.basename }}"
EnableDebugger "{{ collectd_settings.plugins.perl.enabledebugger }}"
LoadPlugin "{{ collectd_settings.plugins.perl.loadplugin }}"
</Plugin>

15 changes: 15 additions & 0 deletions collectd/perl.sls
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{% from "collectd/map.jinja" import collectd_settings with context %}

include:
- collectd

{{ collectd_settings.plugindirconfig }}/perl.conf:
file.managed:
- source: salt://collectd/files/perl.conf
- user: {{ collectd_settings.user }}
- group: {{ collectd_settings.group }}
- mode: 644
- template: jinja
- watch_in:
- service: collectd-service

File renamed without changes.
1 change: 1 addition & 0 deletions pillar.example
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ collectd:
port: 17264
user: ''
pass: ''
prefix: ''
lib: '/usr/lib/jvm/java-7-oracle/jre/lib/amd64/libjava.so'
ethstat:
interface: 'eth0'
Expand Down