Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

collectd.javalib is not set for RedHat #27

Open
wwentland opened this issue Mar 20, 2015 · 0 comments
Open

collectd.javalib is not set for RedHat #27

wwentland opened this issue Mar 20, 2015 · 0 comments

Comments

@wwentland
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant