Description of problem: As a requirement of the common data model, each metric needs to have the ovirt environment identifier, so if data from several ovirt environments is collected to the same central metrics store it will be saved to different indexes and can be used to filter by it. For that we need to add to the metrics the identifier to the ansible script and to the fluentd.conf. The identifier can be: 1. The ovirt engine fqdn 2. We can generate a random uuid 3. Ask the user to provide the name.
I think we should go with the FQDN. I'm not sure what we'll do with the UUID, and I don't want to ask the user anything. I'm aware that FQDNs change from time to time. We'll need to add it to the rename tool later on.
FQDN should also be part of the document as a searchable field in any case.
(In reply to Yaniv Dary from comment #2) > FQDN should also be part of the document as a searchable field in any case. The "hostname" field is one of the default top level fields in the common data model. ovirt should fill this in with the FQDN. It is a searchable field. It is not part of the OpenShift/common logging namespace name, nor part of the Elasticsearch index name.
(In reply to Rich Megginson from comment #3) > (In reply to Yaniv Dary from comment #2) > > FQDN should also be part of the document as a searchable field in any case. > > The "hostname" field is one of the default top level fields in the common > data model. ovirt should fill this in with the FQDN. It is a searchable > field. It is not part of the OpenShift/common logging namespace name, nor > part of the Elasticsearch index name. Yes. I'll add it to the common data model under the "ovirt" tree. It would be called ovirt_engine_hostname / ovirt_engine_fqdn. Yaniv, Which one is preferred or should we add both?
(In reply to Shirly Radco from comment #4) > (In reply to Rich Megginson from comment #3) > > (In reply to Yaniv Dary from comment #2) > > > FQDN should also be part of the document as a searchable field in any case. > > > > The "hostname" field is one of the default top level fields in the common > > data model. ovirt should fill this in with the FQDN. It is a searchable > > field. It is not part of the OpenShift/common logging namespace name, nor > > part of the Elasticsearch index name. > > Yes. I'll add it to the common data model under the "ovirt" tree. > It would be called ovirt_engine_hostname / ovirt_engine_fqdn. > Yaniv, Which one is preferred or should we add both? 1. engine FQDN. 2. ovirt_env_name - must be a valid OpenShift namespace identifier - alphanum + "-" character, cannot begin with "-" or a number, and cannot end with a “-”, up to 10 characters.
(In reply to Shirly Radco from comment #5) > 1. engine FQDN. OK. > 2. ovirt_env_name - must be a valid OpenShift namespace identifier - > alphanum + "-" character, cannot begin with "-" or a number, and cannot end > with a “-”, up to 10 characters. Where do we get it from? User configurable? I think that for now we can expect it to be added by the user in the config.yml file, and create a random one if/when we create a tool to help create this file (see bug 1405812). OK?
ovirt_env_name should be user configurable. Can be in the config.yml file. If the name will not be complaint with the openshift requirements, the central Fluentd will fail to parse the records and no records will be passed to Elasticsearch. I think having a name check must be part of this bug. Not sure if we want to have a default name. Yaniv?
(In reply to Shirly Radco from comment #7) > ovirt_env_name should be user configurable. Can be in the config.yml file. > > If the name will not be complaint with the openshift requirements, the > central Fluentd will fail to parse the records and no records will be passed > to Elasticsearch. > > I think having a name check must be part of this bug. > > Not sure if we want to have a default name. Yaniv? At scrub meeting we discussed it and engine-setup needs to ask the name and provide the default. Yaniv suggests "engine".
** Update - ovirt_env_name - must be a valid OpenShift namespace identifier - alphanum + "-" character, cannot begin with "-" or a number, and cannot end with a “-”, up to 49 characters. The length is opentshift limitation for the total text length. Total length should be up to 63 characters. "ovirt-metrics-" is 14 characters.
We still need to limit the 'ovirt_env_name' to 49 characters. Moving back to New.
Added a separate bug 1462500, to handle the ovirt_env_name validation. This bug only handle the ovirt_env_name field population.
Is this idea hidden just for functionality with viaq or is it shown in the lables? I am unable to query for such field in kibana. If its indeed just for communication Im inclined to add CodeChange and do Sanity only. Kibana seems to be reporting correctly in ovirt-engine-metrics-1.0.4.2-1.el7ev.noarch
In the config.yml you should add the ovirt_env_name. This configures the elasticsearch index names. The default is "engine" which create ovirt-metrics-engine and ovirt-logs-engine prefixes. It is saved in the "_index" field as well as under "kubernetes" namespace as "namespace_name". Example: "kubernetes": { "namespace_name": "ovirt-metrics-engine", "pod_name": "mux", "namespace_id": "b130f429-3560-11e7-96f0-001a4a23128a", "container_name": "mux-mux" } For engine_fqdn, it is available for hosts and vms records. It is nested under "ovirt" namspace. Yaniv, does engine_fqdn required also in engine records?
Few issues with this one: 1. setting up ovirt_env_name does not make it to samples stored in elasticsearch and previewd by kibana my config file: local_fluentd_ca_cert_path: /root/mux-ca.crt fluentd_shared_key: secre-tgenerated fluentd_fluentd_host: lsvaty-vm1.example.com ovirt_env_name: lsvaty_test-ovirt sample from kibana: { "_index": ".operations.2017.06.22", "_type": "com.redhat.viaq.common", "_id": "AVzPrnBw-JHtk37G4A56", "_score": null, "_source": { "docker": { "container_id": "4d0fb93f0ae1091705331f9ca516e235ddb7c72394f9f80787a1f10dcb028822" }, "kubernetes": { "namespace_name": "default", "pod_name": "docker-registry-1-m3b4p", "pod_id": "3086295e-5660-11e7-94be-001a4a803f01", "labels": { "deployment": "docker-registry-1", "deploymentconfig": "docker-registry", "docker-registry": "default" }, "host": "lsvaty-vm1.vm1.example.com", "namespace_id": "60747ef7-565e-11e7-94be-001a4a803f01", "container_name": "registry" }, "hostname": "lsvaty-vm1.example.com", "message": "10.128.0.1 - - [22/Jun/2017:12:02:08 +0000] \"GET /healthz HTTP/2.0\" 200 0 \"\" \"Go-http-client/2.0\"", "level": "6", "pipeline_metadata": { "collector": { "ipaddr4": "99.999.9.99", "ipaddr6": "ffff::ffff:ffff:ffff:ffff", "inputname": "fluent-plugin-systemd", "name": "fluentd openshift", "received_at": "2017-06-22T12:02:08.945607+00:00", "version": "0.12.29 1.4.0" } }, "@timestamp": "2017-06-22T12:02:08.945607+00:00" }, "fields": { "pipeline_metadata.collector.received_at": [ 1498132928945 ], "@timestamp": [ 1498132928945 ] }, "sort": [ 1498132928945 ] } 2. we do not support hidden options, please document it in config.yml.example
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.
sample contains the tag, however not in _index as specificed, Shirly? also we need to specifcy the format of this string, what special characters are supported?? @#$%^&* { "_index": "ovirt-metrics-2017.06.26", <==== no tag here "_type": "fluentd", "_id": "AVzkx__1GiB38QjWfBZc", "_score": null, "_source": { "hostname": "ls-engine1.example.com", "collectd": { "dstypes": [ "gauge" ], "interval": 10, "plugin": "cpu", "plugin_instance": "2", "type": "percent", "type_instance": "user", "cpu": { "percent": 1.20240480961924 } }, "tag": "project.ovirt-metrics-lsvaty_test-ovirt", <=========== "ovirt": { "entity": "engine" }, "ipaddr4": "...", "ipaddr6": "::", "@timestamp": "2017-06-26T16:21:28+02:00" }, "fields": { "@timestamp": [ 1498486888000 ] }, "sort": [ 1498486888000 ] } In config.yml.example you can see: [root@ls-engine1 ovirt-engine-metrics]# cat config.yml.example config.yml # This is an example file for oVirt metrics configuration. # To use this file, copy it to /etc/ovirt-engine-metrics/config.yml and edit. # Address of the central fluentd machine fluentd_fluentd_host: fluentd-server.example.com # Shared secret on the central fluentd machine fluentd_shared_key: my_shared_key # Path to the cert of the CA used to sign central fluentd cert # To use the engine internal CA, use: # local_fluentd_ca_cert_path: /etc/pki/ovirt-engine/ca.pem local_fluentd_ca_cert_path: /path/to/fluentd_ca_cert.pem # Environment name. Can be used to identify data collected in a single central # store sent from more than one oVirt engine. # Maximum field length is 49 characters. # For more details see: # https://bugzilla.redhat.com/1419858 # TODO replace above link with some nicer page on ovirt.org ovirt_env_name: engine Do we have a bug for this TODO: ?
Bug 1462500