| {%- if pillar.opencontrail is defined %} |
| {%- from "opencontrail/map.jinja" import control, collector, compute, config, database, version, web with context %} |
| agent: |
| input: |
| {%- if collector.get('enabled', False) or database.get('enabled', False) or control.get('enabled', False) |
| or web.get('enabled', False) or compute.get('enabled', False) %} |
| procstat: |
| process: |
| {%- if collector.get('enabled', False) %} |
| contrail-alarm-gen: |
| pattern: 'python.*contrail-alarm-gen' |
| contrail-analytics-api: |
| pattern: 'python.*contrail-analytics-api' |
| contrail-collector: |
| pattern: 'contrail-collector' |
| {%- if version < 4.0 %} |
| contrail-nodemgr: |
| pattern: 'python.*contrail-nodemgr$' |
| {%- else %} |
| contrail-nodemgr-analytics: |
| pattern: 'python.*contrail-nodemgr.*-analytics' |
| {%- endif %} |
| contrail-query-engine: |
| pattern: 'contrail-query-engine' |
| contrail-snmp-collector: |
| pattern: 'python.*contrail-snmp-collector' |
| {%- if version < 4.0 %} |
| contrail-supervisord-analytics: |
| pattern: 'python.*supervisord.*_analytics' |
| {% endif %} |
| contrail-topology: |
| pattern: 'python.*contrail-topology' |
| {%- endif %} |
| {%- if database.get('enabled', False) %} |
| zookeeper-server: |
| pattern: 'java.*zookeeper.server' |
| cassandra-server: |
| pattern: 'java.*service.CassandraDaemon' |
| {%- if version < 4.0 %} |
| contrail-nodemgr-database: |
| pattern: 'python.*contrail-nodemgr.*-database' |
| kafka-server: |
| pattern: 'java.*kafka.Kafka' |
| contrail-supervisord-database: |
| pattern: 'python.*supervisord.*_database' |
| {%- else %} |
| {%- if database.get('type') == 'analytics' or database.get('type') == 'cluster' %} |
| contrail-nodemgr-database: |
| pattern: 'python.*contrail-nodemgr.*-database' |
| kafka-server: |
| pattern: 'java.*kafka.Kafka' |
| {%- endif %} |
| {%- endif %} |
| {%- endif %} |
| {%- if control.get('enabled', False) %} |
| contrail-api: |
| pattern: 'python.*contrail-api' |
| contrail-control: |
| pattern: '[^=]contrail-control$' |
| contrail-device-manager: |
| pattern: 'python.*contrail-device-manager' |
| {%- if version < 4.0 %} |
| contrail-discovery: |
| pattern: 'python.*contrail-discovery' |
| {%- endif %} |
| contrail-dns: |
| pattern: 'contrail-dns' |
| {%- if config.get('ifmap', {}).get('engine', 'irond') == 'irond' %} |
| {%- if version < 4.0 %} |
| contrail-ifmap-server: |
| pattern: 'sh.*ifmap-server' |
| contrail-irond: |
| pattern: 'java.*irond' |
| {%- endif %} |
| {%- endif %} |
| contrail-job-server: |
| pattern: 'node.*jobServerStart' |
| contrail-named: |
| pattern: 'contrail-named' |
| contrail-nodemgr-config: |
| pattern: 'python.*contrail-nodemgr.*-config' |
| contrail-nodemgr-control: |
| pattern: 'python.*contrail-nodemgr.*-control' |
| contrail-schema: |
| pattern: 'python.*contrail-schema' |
| {%- if version < 4.0 %} |
| contrail-supervisord-config: |
| pattern: 'python.*supervisord.*_config' |
| contrail-supervisord-control: |
| pattern: 'python.*supervisord.*_control' |
| {%- endif %} |
| contrail-svc-monitor: |
| pattern: 'python.*contrail-svc-monitor' |
| {%- endif %} |
| {%- if web.get('enabled', False) %} |
| contrail-web-server: |
| pattern: 'node.*webServerStart' |
| {%- if web.get('cache', {}).get('engine', '') == 'redis' %} |
| redis-server: |
| pattern: 'redis-server' |
| {%- endif %} |
| {%- endif %} |
| {%- if compute.get('enabled', False) %} |
| contrail-nodemgr-vrouter: |
| pattern: 'python.*contrail-nodemgr.*-vrouter' |
| {%- if version < 4.0 %} |
| contrail-supervisord-vrouter: |
| pattern: 'python.*supervisord.*_vrouter' |
| {%- endif %} |
| contrail-vrouter-agent: |
| pattern: 'contrail-vrouter-agent' |
| {%- endif %} |
| {%- endif %} |
| {%- if config.get('enabled', False) or collector.get('enabled', False) or compute.get('enabled', False) %} |
| http_response: |
| {%- if config.get('enabled', False) %} |
| {%- set bind_addr=config.bind.address|replace('0.0.0.0', '127.0.0.1') %} |
| contrail-api: |
| address: "http://{{ bind_addr }}:{{ config.bind.api_port|default(9100) }}/" |
| {%- if version < 4.0 %} |
| contrail-discovery: |
| address: "http://{{ bind_addr }}:{{ config.bind.discovery_port|default(9110) }}/" |
| {%- endif %} |
| {%- endif %} |
| {%- if collector.get('enabled', False) %} |
| contrail-collector: |
| address: "http://{{ collector.bind.address|replace('0.0.0.0', '127.0.0.1') }}:{{ collector.bind.port|default(9081) }}/" |
| {%- endif %} |
| {%- if compute.get('enabled', False) %} |
| contrail-node-manager: |
| address: "http://127.0.0.1:8102/" |
| contrail-vrouter: |
| address: "http://127.0.0.1:8085/" |
| {%- endif %} |
| {%- endif %} |
| {%- if database is defined and database.get('enabled', False) %} |
| zookeeper: |
| {%- set addr=database.bind.host|replace('0.0.0.0', '127.0.0.1') %} |
| {%- if version < 4.0 %} |
| urls: ["{{ addr }}:2181"] |
| {%- else %} |
| {%- if database.get('type') == 'control'%} |
| urls: ["{{ addr }}:2181"] |
| {%- elif database.get('type') == 'analytics' %} |
| urls: ["{{ addr }}:2182"] |
| {%- elif database.get('type') == 'cluster' %} |
| urls: ["{{ addr }}:2181", "{{ addr }}:2182"] |
| {%- endif %} |
| {%- endif %} |
| {%- endif %} |
| {%- if control.get('enabled', False) or compute.get('enabled', False) %} |
| contrail: |
| template: opencontrail/files/telegraf.conf |
| {%- if control.get('enabled', False) %} |
| # ifmap_count is always disabled because it puts too much load on the IF-MAP server |
| # and the metric is pretty much useless. |
| ifmap_count: "false" |
| {%- endif %} |
| checks: |
| {%- if control.get('enabled', False) %} |
| {%- set bind_addr=control.bind.address|replace('0.0.0.0', '127.0.0.1') %} |
| bgp_session_count: |
| url: "http://{{ bind_addr }}:8083/Snh_ShowNeighborStatisticsReq?bgp_or_xmpp=bgp" |
| xml_element: "ShowNeighborStatisticsResp" |
| result_type: "count" |
| bgp_session_up_count: |
| url: "http://{{ bind_addr }}:8083/Snh_ShowNeighborStatisticsReq?bgp_or_xmpp=bgp&up_or_down=up" |
| xml_element: "ShowNeighborStatisticsResp" |
| result_type: "count" |
| bgp_session_down_count: |
| url: "http://{{ bind_addr }}:8083/Snh_ShowNeighborStatisticsReq?bgp_or_xmpp=bgp&up_or_down=down" |
| xml_element: "ShowNeighborStatisticsResp" |
| result_type: "count" |
| xmpp_session_count: |
| url: "http://{{ bind_addr }}:8083/Snh_ShowNeighborStatisticsReq?bgp_or_xmpp=xmpp" |
| xml_element: "ShowNeighborStatisticsResp" |
| result_type: "count" |
| xmpp_session_up_count: |
| url: "http://{{ bind_addr }}:8083/Snh_ShowNeighborStatisticsReq?bgp_or_xmpp=xmpp&up_or_down=up" |
| xml_element: "ShowNeighborStatisticsResp" |
| result_type: "count" |
| xmpp_session_down_count: |
| url: "http://{{ bind_addr }}:8083/Snh_ShowNeighborStatisticsReq?bgp_or_xmpp=xmpp&up_or_down=down" |
| xml_element: "ShowNeighborStatisticsResp" |
| result_type: "count" |
| {%- endif %} |
| {%- if compute.get('enabled', False) %} |
| {%- set bind_addr=compute.interface.address|replace('0.0.0.0', '127.0.0.1') %} |
| vrouter_flows_active: |
| url: "http://{{ bind_addr }}:8085/Snh_AgentStatsReq" |
| xml_element: "FlowStatsResp" |
| result_type: "flow_active" |
| vrouter_flows_aged: |
| url: "http://{{ bind_addr }}:8085/Snh_AgentStatsReq" |
| xml_element: "FlowStatsResp" |
| result_type: "flow_aged" |
| vrouter_flows_created: |
| url: "http://{{ bind_addr }}:8085/Snh_AgentStatsReq" |
| xml_element: "FlowStatsResp" |
| result_type: "flow_created" |
| vrouter_flows_composite_invalid_interface: |
| url: "http://{{ bind_addr }}:8085/Snh_KDropStatsReq" |
| xml_element: "KDropStatsResp" |
| result_type: "ds_invalid_if" |
| vrouter_flows_discard: |
| url: "http://{{ bind_addr }}:8085/Snh_KDropStatsReq" |
| xml_element: "KDropStatsResp" |
| result_type: "ds_discard" |
| vrouter_flows_flow_action_drop: |
| url: "http://{{ bind_addr }}:8085/Snh_KDropStatsReq" |
| xml_element: "KDropStatsResp" |
| result_type: "ds_flow_action_drop" |
| vrouter_flows_flow_queue_limit_exceeded: |
| url: "http://{{ bind_addr }}:8085/Snh_KDropStatsReq" |
| xml_element: "KDropStatsResp" |
| result_type: "ds_flow_queue_limit_exceeded" |
| vrouter_flows_flow_table_full: |
| url: "http://{{ bind_addr }}:8085/Snh_KDropStatsReq" |
| xml_element: "KDropStatsResp" |
| result_type: "ds_flow_table_full" |
| vrouter_flows_frag_err: |
| url: "http://{{ bind_addr }}:8085/Snh_KDropStatsReq" |
| xml_element: "KDropStatsResp" |
| result_type: "ds_frag_err" |
| vrouter_flows_invalid_label: |
| url: "http://{{ bind_addr }}:8085/Snh_KDropStatsReq" |
| xml_element: "KDropStatsResp" |
| result_type: "ds_invalid_label" |
| vrouter_flows_invalid_nh: |
| url: "http://{{ bind_addr }}:8085/Snh_KDropStatsReq" |
| xml_element: "KDropStatsResp" |
| result_type: "ds_invalid_nh" |
| {%- if version < 4.0 %} |
| vrouter_dns_xmpp: |
| url: "http://{{ bind_addr }}:8085/Snh_AgentDnsXmppConnectionStatusReq" |
| xml_element: "AgentXmppDnsData" |
| state: "Established" |
| {%- endif %} |
| vrouter_lls: |
| url: "http://{{ bind_addr }}:8085/Snh_LinkLocalServiceInfo" |
| xml_element: "LinkLocalServiceData" |
| vrouter_xmpp: |
| url: "http://{{ bind_addr }}:8085/Snh_AgentXmppConnectionStatusReq" |
| xml_element: "AgentXmppData" |
| state: "Established" |
| {%- endif %} |
| {%- endif %} |
| {%- if pillar.haproxy is defined and pillar.haproxy.proxy is defined %} |
| haproxy: |
| tagdrop: |
| proxy: ["contrail_collector_stats", "contrail_config_stats", "contrail_openstack_stats"] |
| {%- endif %} |
| {%- endif %} |