This repository has been archived by the owner on Nov 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 297
--auto-discover option needs better documentation #1499
Labels
Comments
Yeah this isn't documented very well. We should change the default config to use two directories: one for tasks, the other for plugins:
|
We also could use some community contributions deploying Snap with configuration management tools. I feel like this would avoid having everyone reinvent/rediscover good defaults/best practices. For example, this could be one way take advantage of this setting to load tasks/plugins (with purging support of obsolete tasks/plugins) in Puppet: define snap::plugins(
$version,
) {
$url = "https://github.com/intelsdi-x/${name}/releases/download/${version}/${name}_linux_x86_64"
archive { "/opt/snap/plugins/${name}":
mode => '0755',
source => $url,
notify => Service['snap-telemetry'],
}
}
define snap::task(
$settings,
) {
file { "/opt/snap/tasks/${name}.yml":
content => inline_template("@settings.to_yaml"),
notify => Service['snap-telemetry'],
}
} file { ['/opt/snap/plugins', '/opt/snap/tasks']:
ensure => directory,
purge => true,
}
snap::plugin { 'snap-plugin-publisher-influxdb':
version => 20,
}
snap::plugin { 'snap-plugin-collector-psutil':
version => 9,
} |
When the documentation is updated in regards to the auto load path it should mention that plugins will need to have the proper permissions (including execute bit set). Relates to: #1501 |
nanliu
added a commit
to nanliu/snap
that referenced
this issue
Feb 7, 2017
nanliu
added a commit
that referenced
this issue
Feb 9, 2017
Fix #1499 update explaination to auto-discovery plugin.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
SNAPTELD documentation page lacks proper explanation of --auto-discover option. The option description is "Auto discover paths separated by colons", but doesn't say anything about the purpose.
There is a single example below with "snapteld --auto-discover /opt/snap/plugins/" line suggesting this option might be used to automatically load plugins, but that's all.
In the SNAPTELD_CONFIGURATION page at the end there is a comment on restarting snapteld process and it says that not only plugins in the auto_discover_path will be reloaded, but also tasks! (which wasn't mentioned anywhere else).
And there is the TASKS page which doesn't say anything about auto-discovery and auto-loading tasks at all.
I guess that auto-loading tasks feature was added later and documentation wasn't properly updated...
Anyway, I suggest adding an explanation of --auto-discover option on the SNAPTELD page with additional examples (with comments) showing clearly it migt be also used for auto-loading tasks.
Additionally, the TASKS page should also be updated with the proper information regarding auto-loading tasks.
The text was updated successfully, but these errors were encountered: