Skip to content

collectd.javalib is not set for RedHat #27

@wwentland

Description

@wwentland

collectd/java.sls contains the following block:

{% from "collectd/map.jinja" import collectd with context %}                     

include:                                                                         
  - collectd  

collectd-java:                                                                   
    file.rename:                                                                 
        - name: {{ collectd.javalib }}                                           
        - source: {{ collectd.javalib }}.new                                     
        - force: False                                                           
        - makedirs: False                                                        

{{ collectd.javalib }}:                                                          
    file.symlink:                                                                
        - target: {{ salt['pillar.get']('collectd:plugins:java:lib') }}          
        - makedirs: False  

which requires collectd.javalib to be defined in the collectd map in map.jinja. Closer inspection reveals the following:

{% set collectd = salt['grains.filter_by']({                                     
    'Debian': {                                                                  
        'pkg': 'collectd-core',                                                  
        'service': 'collectd',                                                   
        'config': '/etc/collectd/collectd.conf',                                 
        'plugindirconfig': '/etc/collectd/plugins',                              
        'javalib': '/usr/lib/collectd/java.so',                                  
    },                                                                           
    'RedHat': {                                                                  
        'pkg': 'collectd',                                                       
        'service': 'collectd',                                                   
        'config': '/etc/collectd.conf',                                                                                
        'plugindirconfig': '/etc/collectd.d',                                    
    },                                                                           
}, merge=salt['pillar.get']('collectd:lookup')) %} 

where you can easily see that javalib has only been defined for Debian (which causes #26) but not RedHat. This is, obviously, rather suboptimal.

It is also not clear at all why one can't use the collectd java plugin with the default java library by default and why this whole symlinking is needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions