Révision 181f3ed9
Fix pod doc in header of file
| plugins/openstack/openstack_swift_stats_ | ||
|---|---|---|
| 1 | 1 |
#!/bin/sh |
| 2 | 2 |
|
| 3 |
#=begin |
|
| 4 |
# |
|
| 5 |
#=head1 NAME |
|
| 6 |
# |
|
| 7 |
#openstack_swift_stats_ -- Plugin to monitor size of OpenStack Swift containers |
|
| 8 |
# |
|
| 9 |
#=head1 ABOUT |
|
| 10 |
# |
|
| 11 |
#Multigraph plugin. Graphs the following statistics about an OpenStack Swift container: |
|
| 12 |
#- Size in bytes |
|
| 13 |
#- Growth in size per graph period (hour by default) |
|
| 14 |
# |
|
| 15 |
#- Number of objects |
|
| 16 |
#- Growth in objects per graph period (hour by default) |
|
| 17 |
# |
|
| 18 |
#=head1 CONFIGURATION |
|
| 19 |
# |
|
| 20 |
#Configuration values are mandatory. Names are identical to the environment values used by the Swift commands and passed directly to it. |
|
| 21 |
#They can be copied from the openrc.sh file provided by your OpenStack hosting provider, along with the password. |
|
| 22 |
# |
|
| 23 |
#OS_AUTH_URL |
|
| 24 |
#OS_IDENTITY_API_VERSION |
|
| 25 |
#OS_REGION_NAME |
|
| 26 |
#OS_USER_DOMAIN_NAME |
|
| 27 |
#OS_PROJECT_DOMAIN_NAME |
|
| 28 |
#OS_TENANT_ID |
|
| 29 |
#OS_TENANT_NAME |
|
| 30 |
#OS_USERNAME |
|
| 31 |
#OS_PASSWORD |
|
| 32 |
# |
|
| 33 |
#Configuration example for OVH: |
|
| 34 |
# |
|
| 35 |
#[openstack_swift_size_*] |
|
| 36 |
# env.OS_AUTH_URL https://auth.cloud.ovh.net/v3/ |
|
| 37 |
# env.OS_IDENTITY_API_VERSION 3 |
|
| 38 |
# env.OS_REGION_NAME SYD |
|
| 39 |
# env.OS_USER_DOMAIN_NAME Default |
|
| 40 |
# env.OS_PROJECT_DOMAIN_NAME Default |
|
| 41 |
# |
|
| 42 |
# env.OS_TENANT_ID {{Redacted}}
|
|
| 43 |
# env.OS_TENANT_NAME {{Redacted}}
|
|
| 44 |
# env.OS_USERNAME user-{{Redacted}}
|
|
| 45 |
# env.OS_PASSWORD {{Redacted}}
|
|
| 46 |
# |
|
| 47 |
#=head1 USAGE |
|
| 48 |
# |
|
| 49 |
#- Place the plugin in your plugins storage directory (/usr/share/munin/plugins) |
|
| 50 |
#- Symlink it into the active plugins directory (/etc/munin/plugins) with the name of your container after the last underscore |
|
| 51 |
# (e.g. ln -s /usr/share/munin/plugins/openstack_swift_stats_ /etc/munin/plugins/openstack_swift_stats_mycontainer) |
|
| 52 |
#- Copy the OpenStack login environment variables from the openrc.sh file provided by your hosting provider to your plugin config file as shown in the configuration section. |
|
| 53 |
#- Add the OS_PASSWORD value for the chosen user. |
|
| 54 |
# |
|
| 55 |
#=head1 AUTHOR |
|
| 56 |
# |
|
| 57 |
#Copyright (C) 2020 Sophie Parker (dev@cortices.me) |
|
| 58 |
# |
|
| 59 |
#=head1 LICENSE |
|
| 60 |
# |
|
| 61 |
#This program is free software; you can redistribute it and/or |
|
| 62 |
#modify it under the terms of the GNU General Public License |
|
| 63 |
#as published by the Free Software Foundation; version 2 dated June, |
|
| 64 |
#1991. |
|
| 65 |
# |
|
| 66 |
#This program is distributed in the hope that it will be useful, |
|
| 67 |
#but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 68 |
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 69 |
#GNU General Public License for more details. |
|
| 70 |
# |
|
| 71 |
#You should have received a copy of the GNU General Public License |
|
| 72 |
#along with this program; if not, write to the Free Software |
|
| 73 |
#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
|
| 74 |
# |
|
| 75 |
#=head1 MAGIC MARKERS |
|
| 76 |
# |
|
| 77 |
##%# family=manual |
|
| 78 |
# |
|
| 79 |
#=end |
|
| 80 |
# |
|
| 3 |
: <<=cut |
|
| 4 |
|
|
| 5 |
|
|
| 6 |
=head1 NAME |
|
| 7 |
|
|
| 8 |
B<openstack_swift_stats_> -- Plugin to monitor size of OpenStack Swift containers |
|
| 9 |
|
|
| 10 |
=head1 ABOUT |
|
| 11 |
|
|
| 12 |
Multigraph plugin. Graphs the following statistics about an OpenStack Swift container: |
|
| 13 |
|
|
| 14 |
=over |
|
| 15 |
|
|
| 16 |
=item * Size in bytes |
|
| 17 |
|
|
| 18 |
=item * Growth in size per graph period (hour by default) |
|
| 19 |
|
|
| 20 |
=item * Number of objects |
|
| 21 |
|
|
| 22 |
=item * Growth in objects per graph period (hour by default) |
|
| 23 |
|
|
| 24 |
=back |
|
| 25 |
|
|
| 26 |
=head1 CONFIGURATION |
|
| 27 |
|
|
| 28 |
Configuration values are mandatory. Names are identical to the environment values used by the Swift commands and passed directly to it. |
|
| 29 |
They can be copied from the openrc.sh file provided by your OpenStack hosting provider, along with the password. |
|
| 30 |
|
|
| 31 |
=begin html |
|
| 32 |
|
|
| 33 |
<pre><code>OS_AUTH_URL |
|
| 34 |
OS_IDENTITY_API_VERSION |
|
| 35 |
OS_REGION_NAME |
|
| 36 |
OS_USER_DOMAIN_NAME |
|
| 37 |
OS_PROJECT_DOMAIN_NAME |
|
| 38 |
OS_TENANT_ID |
|
| 39 |
OS_TENANT_NAME |
|
| 40 |
OS_USERNAME |
|
| 41 |
OS_PASSWORD |
|
| 42 |
</pre></code> |
|
| 43 |
|
|
| 44 |
=end html |
|
| 45 |
|
|
| 46 |
Configuration example for OVH: |
|
| 47 |
|
|
| 48 |
=begin html |
|
| 49 |
|
|
| 50 |
<pre><code>[openstack_swift_size_*] |
|
| 51 |
env.OS_AUTH_URL https://auth.cloud.ovh.net/v3/ |
|
| 52 |
env.OS_IDENTITY_API_VERSION 3 |
|
| 53 |
env.OS_REGION_NAME SYD |
|
| 54 |
env.OS_USER_DOMAIN_NAME Default |
|
| 55 |
env.OS_PROJECT_DOMAIN_NAME Default |
|
| 56 |
|
|
| 57 |
env.OS_TENANT_ID {{Redacted}}
|
|
| 58 |
env.OS_TENANT_NAME {{Redacted}}
|
|
| 59 |
env.OS_USERNAME user-{{Redacted}}
|
|
| 60 |
env.OS_PASSWORD {{Redacted}}
|
|
| 61 |
</pre></code> |
|
| 62 |
|
|
| 63 |
=end html |
|
| 64 |
|
|
| 65 |
=head1 USAGE |
|
| 66 |
|
|
| 67 |
=over |
|
| 68 |
|
|
| 69 |
=item 1. Place the plugin in your plugins storage directory (/usr/share/munin/plugins) |
|
| 70 |
|
|
| 71 |
=item 2. Symlink it into the active plugins directory (/etc/munin/plugins) with the name of your container after the last underscore |
|
| 72 |
(e.g. ln -s /usr/share/munin/plugins/openstack_swift_stats_ /etc/munin/plugins/openstack_swift_stats_mycontainer) |
|
| 73 |
|
|
| 74 |
=item 3. Copy the OpenStack login environment variables from the openrc.sh file provided by your hosting provider to your plugin config file as shown in the configuration section. |
|
| 75 |
|
|
| 76 |
=item 4. Add the C<OS_PASSWORD> value for the chosen user (OS as in OpenStack, not Operating System). |
|
| 77 |
|
|
| 78 |
=back |
|
| 79 |
|
|
| 80 |
=head1 AUTHOR |
|
| 81 |
|
|
| 82 |
Copyright (C) 2020 Sophie Parker (cortices@github) |
|
| 83 |
|
|
| 84 |
=head1 LICENSE |
|
| 85 |
|
|
| 86 |
This program is free software; you can redistribute it and/or |
|
| 87 |
modify it under the terms of the GNU General Public License |
|
| 88 |
as published by the Free Software Foundation; version 2 dated June, |
|
| 89 |
1991. |
|
| 90 |
|
|
| 91 |
This program is distributed in the hope that it will be useful, |
|
| 92 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 93 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 94 |
GNU General Public License for more details. |
|
| 95 |
|
|
| 96 |
You should have received a copy of the GNU General Public License |
|
| 97 |
along with this program; if not, write to the Free Software |
|
| 98 |
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
|
| 99 |
|
|
| 100 |
=head1 MAGIC MARKERS |
|
| 101 |
|
|
| 102 |
#%# family=manual |
|
| 103 |
|
|
| 104 |
=cut |
|
| 105 |
|
|
| 106 |
|
|
| 107 |
|
|
| 108 |
|
|
| 81 | 109 |
|
| 82 | 110 |
|
| 83 | 111 |
# Get container to check by splitting off end of filename. |
Formats disponibles : Unified diff