Provide minor changes for the Plugin Guide

The following changes are introduced with this commit:
- edit commands output
- delete blank pages between sections
- make the resources requirements explicit with putting
them into Requirements section

Co-Authored-By: Irina Povolotskaya <ipovolotskaya@mirantis.com>
Co-Authored-By: Simon Pasquier <spasquier@mirantis.com>

Change-Id: I274f65902565ce3cf113de569c33e530cb94a3a0
This commit is contained in:
Irina Povolotskaya 2015-12-07 10:12:26 +03:00 committed by Simon Pasquier
parent 495392ccb5
commit acc80f91f1
4 changed files with 48 additions and 22 deletions

View File

@ -22,6 +22,12 @@ html_theme = 'classic'
html_static_path = ['_static']
latex_documents = [
('index', 'LMAInfrastructureAlerting.tex', u'The LMA Infrastructure Alerting plugin for Fuel Documentation',
('index', 'LMAInfrastructureAlerting.tex',
u'The LMA Infrastructure Alerting plugin for Fuel Documentation',
u'Mirantis Inc.', 'manual'),
]
]
# make latex stop printing blank pages between sections
# http://stackoverflow.com/questions/5422997/sphinx-docs-remove-blank-pages-from-generated-pdfs
latex_elements = {'classoptions': ',openany,oneside', 'babel':
'\\usepackage[english]{babel}'}

View File

@ -13,11 +13,13 @@ Catalog, you need to follow these steps:
2. Copy the RPM file to the Fuel Master node::
[root@home ~]# scp lma_infrastructure_alerting-0.8-0.8.0-0.noarch.rpm root@<Fuel Master node IP address>:
[root@home ~]# scp lma_infrastructure_alerting-0.8-0.8.0-0.noarch.rpm \
root@<Fuel Master node IP address>:
3. Install the plugin using the `Fuel CLI <http://docs.mirantis.com/openstack/fuel/fuel-7.0/user-guide.html#using-fuel-cli>`_::
[root@fuel ~]# fuel plugins --install lma_infrastructure_alerting-0.8-0.8.0-0.noarch.rpm
[root@fuel ~]# fuel plugins --install \
lma_infrastructure_alerting-0.8-0.8.0-0.noarch.rpm
4. Verify that the plugin is installed correctly::
@ -61,7 +63,8 @@ if you need further instructions about how to build the Fuel Plugin Builder.
4. Clone the plugin git repository::
[root@home ~] git clone git@github.com:stackforge/fuel-plugin-lma-infrastructure-alerting.git
[root@home ~] git clone \
git@github.com:stackforge/fuel-plugin-lma-infrastructure-alerting.git
5. Check that the plugin is valid::
@ -73,7 +76,8 @@ if you need further instructions about how to build the Fuel Plugin Builder.
7. Now that you have created the RPM file, you can install the plugin using the `fuel plugins --install` command::
[root@fuel ~] fuel plugins --install ./fuel-plugin-lma-infrastructure-alerting/lma_infrastructure_alerting-0.8-0.8.0-1.noarch.rpm
[root@fuel ~] fuel plugins --install \
./fuel-plugin-lma-infrastructure-alerting/*.rpm
LMA Infrastructure Alerting Fuel Plugin software components

View File

@ -21,6 +21,8 @@ Requirements
+----------------------------------+---------------------------------------------------------+
| Requirement | Version/Comment |
+==================================+=========================================================+
| Disk space | At least 45GB |
+----------------------------------+---------------------------------------------------------+
| Fuel | Mirantis OpenStack 7.0 |
+----------------------------------+---------------------------------------------------------+
| The LMA collector Fuel plugin | At least 0.8.0 |

View File

@ -51,7 +51,8 @@ To configure your plugin, you need to follow these steps:
To workaround this problem, you should either remove the already assigned built-in roles or use the Fuel CLI::
$ fuel --env <environment id> node set --node-id <node_id> --role=infrastructure_alerting
$ fuel --env <environment id> node set \
--node-id <node_id> --role=infrastructure_alerting
#. Please take into consideration the information on the disks partitioning.
By default, the LMA Infrastructure Alerting Plugin allocates:
@ -167,17 +168,23 @@ usage threshold. The steps to define those alarms in Nagios would be as follow:
#. Define the command and the service check in the ``/etc/nagios3/conf.d/influxdb_services.conf`` file::
# Replace <INFLUXDB_USER> and <INFLUXDB_PASSWORD> by the appropriate values for your deployment
# Replace <INFLUXDB_HOST>, <INFLUXDB_USER> and <INFLUXDB_PASSWORD> by
# the appropriate values for your deployment
define command {
command_line /usr/local/bin/check_influx -h localhost -u <INFLUXDB_USER> -p <INFLUXDB_PASSWORD> -d lma -q "$ARG1$" -w $ARG2$ -c $ARG3$
command_name check_influx
command_line /usr/local/bin/check_influx \
-h <INFLUXDB_HOST> -u <INFLUXDB_USER> -p <INFLUXDB_PASSWORD> -d lma \
-q "select max(value) from lma_components_cputime_syst \
where time > now() - 5m and service='$ARG1$' \
group by time(5m) limit 1" \
-w $ARG2$ -c $ARG3$
command_name check_cpu_metric
}
define service {
service_description Elasticsearch system CPU
host node-13
check_command check_influx!select max(value) from lma_components_cputime_syst where time > now() - 5m and service='elasticsearch' group by time(5m) limit 1!30!50:
use generic-service
service_description Elasticsearch system CPU
host node-13
check_command check_cpu_metric!elasticsearch!30!50:
use generic-service
}
#. Verify that the Nagios configuration is valid::
@ -228,14 +235,21 @@ Authentication method to use either to Plain, Login or CRAM-MD5 first.
instance::
define command{
command_name notify-service-by-smtp-with-long-service-output
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$\n$LONGSERVICEOUTPUT$\n" | /usr/bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" -r 'nagios@localhost' \
-S smtp="smtp://<SMTP_HOST>" \
-S smtp-auth=<SMTP_AUTH_METHOD> \
-S smtp-auth-user='<SMTP_USER>' \
-S smtp-auth-password='<SMTP_PASSWORD>' \
-S smtp-use-starttls \
$CONTACTEMAIL$
command_name notify-service-by-smtp-with-long-service-output
command_line /usr/bin/printf "%b" "***** Nagios *****\n\n"\
"Notification Type: $NOTIFICATIONTYPE$\n\n"\
"Service: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\n"\
"State: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\n"\
"Additional Info:\n\n$SERVICEOUTPUT$\n$LONGSERVICEOUTPUT$\n" | \
/usr/bin/mail -s "** $NOTIFICATIONTYPE$ "\
"Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" \
-r 'nagios@localhost' \
-S smtp="smtp://<SMTP_HOST>" \
-S smtp-auth=<SMTP_AUTH_METHOD> \
-S smtp-auth-user='<SMTP_USER>' \
-S smtp-auth-password='<SMTP_PASSWORD>' \
-S smtp-use-starttls \
$CONTACTEMAIL$
}
.. note:: If the server certificate isn't present in the standard directory (eg