Merge "polling: remove deprecated agents"
This commit is contained in:
commit
2fc2bfb42e
@ -1,6 +1,6 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- encoding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright 2014 OpenStack Foundation
|
# Copyright 2014-2015 OpenStack Foundation
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
# not use this file except in compliance with the License. You may obtain
|
# not use this file except in compliance with the License. You may obtain
|
||||||
@ -75,20 +75,3 @@ def main():
|
|||||||
service.prepare_service()
|
service.prepare_service()
|
||||||
os_service.launch(CONF, manager.AgentManager(CONF.polling_namespaces,
|
os_service.launch(CONF, manager.AgentManager(CONF.polling_namespaces,
|
||||||
CONF.pollster_list)).wait()
|
CONF.pollster_list)).wait()
|
||||||
|
|
||||||
|
|
||||||
# todo(dbelova): remove it someday. Needed for backward compatibility
|
|
||||||
def main_compute():
|
|
||||||
service.prepare_service()
|
|
||||||
os_service.launch(CONF, manager.AgentManager(['compute'])).wait()
|
|
||||||
|
|
||||||
|
|
||||||
# todo(dbelova): remove it someday. Needed for backward compatibility
|
|
||||||
def main_central():
|
|
||||||
service.prepare_service()
|
|
||||||
os_service.launch(CONF, manager.AgentManager(['central'])).wait()
|
|
||||||
|
|
||||||
|
|
||||||
def main_ipmi():
|
|
||||||
service.prepare_service()
|
|
||||||
os_service.launch(CONF, manager.AgentManager(['ipmi'])).wait()
|
|
||||||
|
@ -339,9 +339,9 @@ function install_ceilometerclient {
|
|||||||
|
|
||||||
# start_ceilometer() - Start running processes, including screen
|
# start_ceilometer() - Start running processes, including screen
|
||||||
function start_ceilometer {
|
function start_ceilometer {
|
||||||
run_process ceilometer-acentral "$CEILOMETER_BIN_DIR/ceilometer-agent-central --config-file $CEILOMETER_CONF"
|
run_process ceilometer-acentral "$CEILOMETER_BIN_DIR/ceilometer-polling --polling-namespaces central --config-file $CEILOMETER_CONF"
|
||||||
run_process ceilometer-anotification "$CEILOMETER_BIN_DIR/ceilometer-agent-notification --config-file $CEILOMETER_CONF"
|
run_process ceilometer-anotification "$CEILOMETER_BIN_DIR/ceilometer-agent-notification --config-file $CEILOMETER_CONF"
|
||||||
run_process ceilometer-aipmi "$CEILOMETER_BIN_DIR/ceilometer-agent-ipmi --config-file $CEILOMETER_CONF"
|
run_process ceilometer-aipmi "$CEILOMETER_BIN_DIR/ceilometer-polling --polling-namespaces ipmi --config-file $CEILOMETER_CONF"
|
||||||
|
|
||||||
if [[ "$CEILOMETER_USE_MOD_WSGI" == "False" ]]; then
|
if [[ "$CEILOMETER_USE_MOD_WSGI" == "False" ]]; then
|
||||||
run_process ceilometer-api "$CEILOMETER_BIN_DIR/ceilometer-api -d -v --log-dir=$CEILOMETER_API_LOG_DIR --config-file $CEILOMETER_CONF"
|
run_process ceilometer-api "$CEILOMETER_BIN_DIR/ceilometer-api -d -v --log-dir=$CEILOMETER_API_LOG_DIR --config-file $CEILOMETER_CONF"
|
||||||
@ -359,10 +359,10 @@ function start_ceilometer {
|
|||||||
# Start the compute agent late to allow time for the collector to
|
# Start the compute agent late to allow time for the collector to
|
||||||
# fully wake up and connect to the message bus. See bug #1355809
|
# fully wake up and connect to the message bus. See bug #1355809
|
||||||
if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then
|
if [[ "$VIRT_DRIVER" = 'libvirt' ]]; then
|
||||||
run_process ceilometer-acompute "$CEILOMETER_BIN_DIR/ceilometer-agent-compute --config-file $CEILOMETER_CONF" $LIBVIRT_GROUP
|
run_process ceilometer-acompute "$CEILOMETER_BIN_DIR/ceilometer-polling --polling-namespaces compute --config-file $CEILOMETER_CONF" $LIBVIRT_GROUP
|
||||||
fi
|
fi
|
||||||
if [[ "$VIRT_DRIVER" = 'vsphere' ]]; then
|
if [[ "$VIRT_DRIVER" = 'vsphere' ]]; then
|
||||||
run_process ceilometer-acompute "$CEILOMETER_BIN_DIR/ceilometer-agent-compute --config-file $CEILOMETER_CONF"
|
run_process ceilometer-acompute "$CEILOMETER_BIN_DIR/ceilometer-polling --polling-namespaces compute --config-file $CEILOMETER_CONF"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Only die on API if it was actually intended to be turned on
|
# Only die on API if it was actually intended to be turned on
|
||||||
|
@ -74,7 +74,14 @@ $CEILOMETER_BIN_DIR/ceilometer-dbsync || die $LINENO "DB sync error"
|
|||||||
start_ceilometer
|
start_ceilometer
|
||||||
|
|
||||||
# Note these are process names, not service names
|
# Note these are process names, not service names
|
||||||
ensure_services_started ceilometer-agent-ipmi ceilometer-agent-compute ceilometer-agent-central ceilometer-agent-notification ceilometer-alarm-evaluator ceilometer-alarm-notifier ceilometer-api ceilometer-collector
|
ensure_services_started "ceilometer-polling --polling-namespaces compute" \
|
||||||
|
"ceilometer-polling --polling-namespaces central" \
|
||||||
|
"ceilometer-polling --polling-namespaces ipmi" \
|
||||||
|
ceilometer-agent-notification \
|
||||||
|
ceilometer-alarm-evaluator \
|
||||||
|
ceilometer-alarm-notifier \
|
||||||
|
ceilometer-api \
|
||||||
|
ceilometer-collector
|
||||||
|
|
||||||
# Save mongodb state (replace with snapshot)
|
# Save mongodb state (replace with snapshot)
|
||||||
if grep -q 'connection *= *mongo' /etc/ceilometer/ceilometer.conf; then
|
if grep -q 'connection *= *mongo' /etc/ceilometer/ceilometer.conf; then
|
||||||
|
@ -125,7 +125,16 @@ Installing the notification agent
|
|||||||
to ``cinder.openstack.common.notifier.rpc_notifier`` and
|
to ``cinder.openstack.common.notifier.rpc_notifier`` and
|
||||||
``control_exchange`` to ``cinder``, before restarting the service.
|
``control_exchange`` to ``cinder``, before restarting the service.
|
||||||
|
|
||||||
3. In order to retrieve object store statistics, ceilometer needs
|
3. If you want to be able to retrieve instance samples, you need to instruct
|
||||||
|
Nova to send notifications to the bus by setting these values::
|
||||||
|
|
||||||
|
# nova-compute configuration for ceilometer
|
||||||
|
instance_usage_audit=True
|
||||||
|
instance_usage_audit_period=hour
|
||||||
|
notify_on_state_change=vm_and_task_state
|
||||||
|
notification_driver=nova.openstack.common.notifier.rpc_notifier
|
||||||
|
|
||||||
|
4. In order to retrieve object store statistics, ceilometer needs
|
||||||
access to swift with ``ResellerAdmin`` role. You should give this
|
access to swift with ``ResellerAdmin`` role. You should give this
|
||||||
role to your ``os_username`` user for tenant ``os_tenant_name``:
|
role to your ``os_username`` user for tenant ``os_tenant_name``:
|
||||||
|
|
||||||
@ -165,18 +174,18 @@ Installing the notification agent
|
|||||||
Please make sure that ceilometer's logging directory (if it's configured)
|
Please make sure that ceilometer's logging directory (if it's configured)
|
||||||
is read and write accessible for the user swift is started by.
|
is read and write accessible for the user swift is started by.
|
||||||
|
|
||||||
4. Clone the ceilometer git repository to the management server::
|
5. Clone the ceilometer git repository to the management server::
|
||||||
|
|
||||||
$ cd /opt/stack
|
$ cd /opt/stack
|
||||||
$ git clone https://git.openstack.org/openstack/ceilometer.git
|
$ git clone https://git.openstack.org/openstack/ceilometer.git
|
||||||
|
|
||||||
5. As a user with ``root`` permissions or ``sudo`` privileges, run the
|
6. As a user with ``root`` permissions or ``sudo`` privileges, run the
|
||||||
ceilometer installer::
|
ceilometer installer::
|
||||||
|
|
||||||
$ cd ceilometer
|
$ cd ceilometer
|
||||||
$ sudo python setup.py install
|
$ sudo python setup.py install
|
||||||
|
|
||||||
6. Copy the sample configuration files from the source tree
|
7. Copy the sample configuration files from the source tree
|
||||||
to their final location.
|
to their final location.
|
||||||
|
|
||||||
::
|
::
|
||||||
@ -186,7 +195,7 @@ Installing the notification agent
|
|||||||
$ cp etc/ceilometer/*.yaml /etc/ceilometer
|
$ cp etc/ceilometer/*.yaml /etc/ceilometer
|
||||||
$ cp etc/ceilometer/ceilometer.conf.sample /etc/ceilometer/ceilometer.conf
|
$ cp etc/ceilometer/ceilometer.conf.sample /etc/ceilometer/ceilometer.conf
|
||||||
|
|
||||||
7. Edit ``/etc/ceilometer/ceilometer.conf``
|
8. Edit ``/etc/ceilometer/ceilometer.conf``
|
||||||
|
|
||||||
1. Configure RPC
|
1. Configure RPC
|
||||||
|
|
||||||
@ -215,7 +224,7 @@ Installing the notification agent
|
|||||||
Refer to :doc:`/configuration` for details about any other options
|
Refer to :doc:`/configuration` for details about any other options
|
||||||
you might want to modify before starting the service.
|
you might want to modify before starting the service.
|
||||||
|
|
||||||
8. Start the notification daemon.
|
9. Start the notification daemon.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
@ -300,90 +309,7 @@ Installing the collector
|
|||||||
or other tool for maintaining a long-running program in the
|
or other tool for maintaining a long-running program in the
|
||||||
background.
|
background.
|
||||||
|
|
||||||
|
Installing the Polling Agent
|
||||||
Installing the Compute Agent
|
|
||||||
============================
|
|
||||||
|
|
||||||
.. index::
|
|
||||||
double: installing; compute agent
|
|
||||||
|
|
||||||
.. note:: The compute agent must be installed on each nova compute node.
|
|
||||||
|
|
||||||
1. Configure nova.
|
|
||||||
|
|
||||||
The ``nova`` compute service needs the following configuration to
|
|
||||||
be set in ``nova.conf``::
|
|
||||||
|
|
||||||
# nova-compute configuration for ceilometer
|
|
||||||
instance_usage_audit=True
|
|
||||||
instance_usage_audit_period=hour
|
|
||||||
notify_on_state_change=vm_and_task_state
|
|
||||||
notification_driver=nova.openstack.common.notifier.rpc_notifier
|
|
||||||
|
|
||||||
2. Clone the ceilometer git repository to the server::
|
|
||||||
|
|
||||||
$ cd /opt/stack
|
|
||||||
$ git clone https://git.openstack.org/openstack/ceilometer.git
|
|
||||||
|
|
||||||
3. As a user with ``root`` permissions or ``sudo`` privileges, run the
|
|
||||||
ceilometer installer::
|
|
||||||
|
|
||||||
$ cd ceilometer
|
|
||||||
$ sudo python setup.py install
|
|
||||||
|
|
||||||
4. Copy the sample configuration files from the source tree
|
|
||||||
to their final location.
|
|
||||||
|
|
||||||
::
|
|
||||||
|
|
||||||
$ mkdir -p /etc/ceilometer
|
|
||||||
$ cp etc/ceilometer/*.json /etc/ceilometer
|
|
||||||
$ cp etc/ceilometer/*.yaml /etc/ceilometer
|
|
||||||
$ cp etc/ceilometer/ceilometer.conf.sample /etc/ceilometer/ceilometer.conf
|
|
||||||
|
|
||||||
5. Edit ``/etc/ceilometer/ceilometer.conf``
|
|
||||||
|
|
||||||
1. Configure RPC
|
|
||||||
|
|
||||||
Set the RPC-related options correctly so ceilometer's daemons
|
|
||||||
can communicate with each other and receive notifications from
|
|
||||||
the other projects.
|
|
||||||
|
|
||||||
In particular, look for the ``*_control_exchange`` options and
|
|
||||||
make sure the names are correct. If you did not change the
|
|
||||||
``control_exchange`` settings for the other components, the
|
|
||||||
defaults should be correct.
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
Ceilometer makes extensive use of the messaging bus, but has
|
|
||||||
not yet been tested with ZeroMQ. We recommend using Rabbit or
|
|
||||||
qpid for now.
|
|
||||||
|
|
||||||
2. Set the ``telemetry_secret`` value.
|
|
||||||
|
|
||||||
Set the ``telemetry_secret`` value to a large, random, value. Use
|
|
||||||
the same value in all ceilometer configuration files, on all
|
|
||||||
nodes, so that messages passing between the nodes can be
|
|
||||||
validated.
|
|
||||||
|
|
||||||
Refer to :doc:`/configuration` for details about any other options
|
|
||||||
you might want to modify before starting the service.
|
|
||||||
|
|
||||||
6. Start the agent.
|
|
||||||
|
|
||||||
::
|
|
||||||
|
|
||||||
$ ceilometer-agent-compute
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
The default development configuration of the agent logs to
|
|
||||||
stderr, so you may want to run this step using a screen session
|
|
||||||
or other tool for maintaining a long-running program in the
|
|
||||||
background.
|
|
||||||
|
|
||||||
Installing the Central Agent
|
|
||||||
============================
|
============================
|
||||||
|
|
||||||
.. index::
|
.. index::
|
||||||
@ -391,8 +317,9 @@ Installing the Central Agent
|
|||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
||||||
The central agent needs to be able to talk to keystone and any of
|
The polling agent needs to be able to talk to Keystone and any of
|
||||||
the services being polled for updates.
|
the services being polled for updates. It also needs to run on your compute
|
||||||
|
nodes to poll instances.
|
||||||
|
|
||||||
1. Clone the ceilometer git repository to the server::
|
1. Clone the ceilometer git repository to the server::
|
||||||
|
|
||||||
@ -416,30 +343,20 @@ Installing the Central Agent
|
|||||||
$ cp etc/ceilometer/ceilometer.conf.sample /etc/ceilometer/ceilometer.conf
|
$ cp etc/ceilometer/ceilometer.conf.sample /etc/ceilometer/ceilometer.conf
|
||||||
|
|
||||||
4. Edit ``/etc/ceilometer/ceilometer.conf``
|
4. Edit ``/etc/ceilometer/ceilometer.conf``
|
||||||
|
Set the RPC-related options correctly so ceilometer's daemons
|
||||||
|
can communicate with each other and receive notifications from
|
||||||
|
the other projects.
|
||||||
|
|
||||||
1. Configure RPC
|
In particular, look for the ``*_control_exchange`` options and
|
||||||
|
make sure the names are correct. If you did not change the
|
||||||
|
``control_exchange`` settings for the other components, the
|
||||||
|
defaults should be correct.
|
||||||
|
|
||||||
Set the RPC-related options correctly so ceilometer's daemons
|
.. note::
|
||||||
can communicate with each other and receive notifications from
|
|
||||||
the other projects.
|
|
||||||
|
|
||||||
In particular, look for the ``*_control_exchange`` options and
|
Ceilometer makes extensive use of the messaging bus, but has
|
||||||
make sure the names are correct. If you did not change the
|
not yet been tested with ZeroMQ. We recommend using Rabbit or
|
||||||
``control_exchange`` settings for the other components, the
|
qpid for now.
|
||||||
defaults should be correct.
|
|
||||||
|
|
||||||
.. note::
|
|
||||||
|
|
||||||
Ceilometer makes extensive use of the messaging bus, but has
|
|
||||||
not yet been tested with ZeroMQ. We recommend using Rabbit or
|
|
||||||
qpid for now.
|
|
||||||
|
|
||||||
2. Set the ``telemetry_secret`` value.
|
|
||||||
|
|
||||||
Set the ``telemetry_secret`` value to a large, random, value. Use
|
|
||||||
the same value in all ceilometer configuration files, on all
|
|
||||||
nodes, so that messages passing between the nodes can be
|
|
||||||
validated.
|
|
||||||
|
|
||||||
Refer to :doc:`/configuration` for details about any other options
|
Refer to :doc:`/configuration` for details about any other options
|
||||||
you might want to modify before starting the service.
|
you might want to modify before starting the service.
|
||||||
@ -448,7 +365,13 @@ Installing the Central Agent
|
|||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
$ ceilometer-agent-central
|
$ ceilometer-polling
|
||||||
|
|
||||||
|
6. By default, the polling agent polls the `compute` and `central` namespaces.
|
||||||
|
You can specify which namespace to poll in the `ceilometer.conf`
|
||||||
|
configuration file or on the command line::
|
||||||
|
|
||||||
|
$ ceilometer-polling --polling-namespaces central,ipmi
|
||||||
|
|
||||||
|
|
||||||
Installing the API Server
|
Installing the API Server
|
||||||
|
@ -270,11 +270,8 @@ ceilometer.event.trait_plugin =
|
|||||||
|
|
||||||
console_scripts =
|
console_scripts =
|
||||||
ceilometer-api = ceilometer.cmd.api:main
|
ceilometer-api = ceilometer.cmd.api:main
|
||||||
ceilometer-agent-central = ceilometer.cmd.eventlet.polling:main_central
|
|
||||||
ceilometer-agent-compute = ceilometer.cmd.eventlet.polling:main_compute
|
|
||||||
ceilometer-polling = ceilometer.cmd.eventlet.polling:main
|
ceilometer-polling = ceilometer.cmd.eventlet.polling:main
|
||||||
ceilometer-agent-notification = ceilometer.cmd.eventlet.agent_notification:main
|
ceilometer-agent-notification = ceilometer.cmd.eventlet.agent_notification:main
|
||||||
ceilometer-agent-ipmi = ceilometer.cmd.eventlet.polling:main_ipmi
|
|
||||||
ceilometer-send-sample = ceilometer.cmd.eventlet.sample:send_sample
|
ceilometer-send-sample = ceilometer.cmd.eventlet.sample:send_sample
|
||||||
ceilometer-dbsync = ceilometer.cmd.eventlet.storage:dbsync
|
ceilometer-dbsync = ceilometer.cmd.eventlet.storage:dbsync
|
||||||
ceilometer-expirer = ceilometer.cmd.eventlet.storage:expirer
|
ceilometer-expirer = ceilometer.cmd.eventlet.storage:expirer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user