Skip to content
Snippets Groups Projects
  • Dincer Celik's avatar
    5ff7bab4
    [prometheus] Added support for extra options · 5ff7bab4
    Dincer Celik authored
    This change introduces the way to pass extra options to prometheus.
    
    Currently, prometheus runs with nearly default options, and when clouds
    start getting bigger, you need to pass extra parameters to prometheus.
    
    Change-Id: Ic773c0b73062cf3b2285343bafb25d5923911834
    5ff7bab4
    History
    [prometheus] Added support for extra options
    Dincer Celik authored
    This change introduces the way to pass extra options to prometheus.
    
    Currently, prometheus runs with nearly default options, and when clouds
    start getting bigger, you need to pass extra parameters to prometheus.
    
    Change-Id: Ic773c0b73062cf3b2285343bafb25d5923911834
prometheus-server.json.j2 1.16 KiB
{
    "command": "/opt/prometheus/prometheus -config.file /etc/prometheus/prometheus.yml -web.listen-address {{ api_interface_address }}:{{ prometheus_port }} -web.external-url={{ internal_protocol }}://{{ kolla_internal_fqdn }}:{{ prometheus_port }} -log.format logger:stdout -storage.local.path /var/lib/prometheus{% if prometheus_cmdline_extras %} {{ prometheus_cmdline_extras }}{% endif %}",
    "config_files": [
        {
            "source": "{{ container_config_directory }}/prometheus.yml",
            "dest": "/etc/prometheus/prometheus.yml",
            "owner": "prometheus",
            "perm": "0600"
        }
{% if enable_prometheus_alertmanager %}
        ,{
            "source": "{{ container_config_directory }}/*.rules",
            "dest": "/etc/prometheus/",
            "optional": true,
            "owner": "prometheus",
            "perm": "0600"
        }
{% endif %}
    ],
    "permissions": [
        {
            "path": "/data",
            "owner": "prometheus:kolla",
            "recurse": true
        },
        {
            "path": "/var/log/kolla/prometheus",
            "owner": "prometheus:kolla",
            "recurse": true
        }
    ]
}