monasca-api/devstack/files/monasca-api/python/api-config.conf

131 lines
4.2 KiB
Plaintext

[DEFAULT]
# logging, make sure that the user under whom the server runs has permission
# to write to the directory.
log_file = monasca-api.log
log_dir = /var/log/monasca/api
debug=True
# Identifies the region that the Monasca API is running in.
region = useast
# Dispatchers to be loaded to serve restful APIs
[dispatcher]
versions = monasca_api.v2.reference.versions:Versions
version_2_0 = monasca_api.v2.reference.version_2_0:Version2
metrics = monasca_api.v2.reference.metrics:Metrics
metrics_measurements = monasca_api.v2.reference.metrics:MetricsMeasurements
metrics_statistics = monasca_api.v2.reference.metrics:MetricsStatistics
metrics_names = monasca_api.v2.reference.metrics:MetricsNames
alarm_definitions = monasca_api.v2.reference.alarm_definitions:AlarmDefinitions
alarms = monasca_api.v2.reference.alarms:Alarms
alarms_count = monasca_api.v2.reference.alarms:AlarmsCount
alarms_state_history = monasca_api.v2.reference.alarms:AlarmsStateHistory
notification_methods = monasca_api.v2.reference.notifications:Notifications
dimension_values = monasca_api.v2.reference.metrics:DimensionValues
notification_method_types = monasca_api.v2.reference.notificationstype:NotificationsType
[security]
# The roles that are allowed full access to the API.
default_authorized_roles = user, domainuser, domainadmin, monasca-user
# The roles that are allowed to only POST metrics to the API. This role would be used by the Monasca Agent.
agent_authorized_roles = monasca-agent
# The roles that are allowed to only GET metrics from the API.
read_only_authorized_roles = monasca-read-only-user
# The roles that are allowed to access the API on behalf of another tenant.
# For example, a service can POST metrics to another tenant if they are a member of the "delegate" role.
delegate_authorized_roles = admin
[messaging]
# The message queue driver to use
driver = monasca_api.common.messaging.kafka_publisher:KafkaPublisher
[repositories]
# The driver to use for the metrics repository
metrics_driver = monasca_api.common.repositories.influxdb.metrics_repository:MetricsRepository
# The driver to use for the alarm definitions repository
alarm_definitions_driver = monasca_api.common.repositories.sqla.alarm_definitions_repository:AlarmDefinitionsRepository
# The driver to use for the alarms repository
alarms_driver = monasca_api.common.repositories.sqla.alarms_repository:AlarmsRepository
# The driver to use for the notifications repository
notifications_driver = monasca_api.common.repositories.sqla.notifications_repository:NotificationsRepository
# The driver to use for the notification method type repository
notification_method_type_driver = monasca_api.common.repositories.sqla.notification_method_type_repository:NotificationMethodTypeRepository
[dispatcher]
driver = v2_reference
[kafka]
# The endpoint to the kafka server
uri = 127.0.0.1:9092
# The topic that metrics will be published too
metrics_topic = metrics
# consumer group name
group = api
# how many times to try when error occurs
max_retry = 1
# wait time between tries when kafka goes down
wait_time = 1
# use synchronous or asynchronous connection to kafka
async = False
# send messages in bulk or send messages one by one.
compact = False
# How many partitions this connection should listen messages on, this
# parameter is for reading from kafka. If listens on multiple partitions,
# For example, if the client should listen on partitions 1 and 3, then the
# configuration should look like the following:
# partitions = 1
# partitions = 3
# default to listen on partition 0.
partitions = 0
[influxdb]
# The IP address of the InfluxDB service.
ip_address = 127.0.0.1
# The port number that the InfluxDB service is listening on.
port = 8086
# The username to authenticate with.
user = mon_api
# The password to authenticate with.
password = password
# The name of the InfluxDB database to use.
database_name = mon
[database]
url = "mysql+pymysql://monapi:password@127.0.0.1/mon"
# [mysql]
# database_name = mon
# hostname = 127.0.0.1
# username = monapi
# password = password
[keystone_authtoken]
identity_uri = http://127.0.0.1:35357
auth_uri = http://127.0.0.1:5000
admin_password = secretadmin
admin_user = admin
admin_tenant_name = admin
cafile =
certfile =
keyfile =
insecure = false