Skip to content

Commit

Permalink
Merge pull request #18 from t0ffel/master
Browse files Browse the repository at this point in the history
added CI model and addressed some comments from OpenShift model
  • Loading branch information
t0ffel authored Jan 23, 2017
2 parents 96598fc + 2a98fe9 commit 03c42a5
Show file tree
Hide file tree
Showing 13 changed files with 742 additions and 67 deletions.
33 changes: 22 additions & 11 deletions namespaces/_default_.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ field_defaults:
_default_:
type: group
description: >
Contains common fields, this is what populates the actual the mappings of the _default_.
Oritinated from the mapping for rsyslog clients, but can be used with other clients as well.
Contains common fields and generic pattern-matched field descriptions; this
is what populates the actual mappings of _default_ in the template's mapping
section.
fields:
- name: "@timestamp"
type: date
Expand Down Expand Up @@ -60,44 +61,50 @@ _default_:
type: string
example: info
description: >
Loging level as provided by: rsyslog(severitytext property), python's logging module, etc.
Possible values: info, warning, notice, err, debug
Logging level as provided by: rsyslog(severitytext property), python's
logging module, etc.
Possible values: trace, crit, alert, emerg
- name: message
type: string
index: analyzed
doc_values: false
example: TODO
description: >
Typical log entry message, or payload, possibly stripped of metadata pulled out of it by collector/normalizer, UTF-8 encoded.
Typical log entry message, or payload, possibly stripped of metadata
pulled out of it by collector/normalizer, UTF-8 encoded.
norms:
enabled: false

- name: pid
type: string
description: >
PID... look into details on systemd stuff
This is the process ID of the logging entity, if available.
- name: service
type: string
description: >
name of the service. syslog's APP-NAME and programname are renamed to service field as well.
Name of the service associated with the logging entity, if available.
For example, syslog's APP-NAME and rsyslog's programname property are
mapped to the service field.
- name: tags
type: string
doc_values: false
index: analyzed
analyzer: whitespace
description: >
Field contains whitespace-delimited tags. Tagging is configured on normalizers/collectors.
Please note that this field is analyzed and not an array since rsyslog doesn't play well with JSON lists
Optionally provided operator defined list of tags placed on each log
by the collector or normalizer. The payload can be a string with
whitespace-delimited string tokens, or a JSON list of string tokens.
- name: file
type: string
index: analyzed
doc_values: false
description: >
Full local path.
Optional path to the file containing the log entry local to the
collector
TODO: analyzer for file paths
norms:
enabled: True
Expand All @@ -109,4 +116,8 @@ _default_:
- name: offset
type: long
description: >
Offset in the log file.
The offset value can represent bytes to the start of the log line in the
file (zero or one based), or log line numbers (zero or one based), so
long as the values are strictly monotonically increasing in the context
of a single log file. They values are allowed to wrap, representing a
new version of the log file (rotation).
70 changes: 70 additions & 0 deletions namespaces/ci_job.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@

namespace:
name: ci_job
type: group
description: >
Namespace for CI-specific metadata. f.e. Jenkins job run metadata.
The namespace contains the details for the metadata of individual job run.
fields:
- name: master
type: string
description: >
FQDN of the CI Master server.
- name: name
type: string
description: >
Name of the CI job.
- name: build_id
type: integer
description: >
Build ID of the CI job.
- name: build_timestamp
type: date
format: yyyy-MM-dd'T'HH:mm:ss.SSSSSSZ||yyyy-MM-dd'T'HH:mm:ssZ||dateOptionalTime
description: >
Time of the build completion if different from field "@timestamp".
- name: duration
type: float
description: >
Build duration in seconds.
- name: phase
type: string
description: >
Phase of the CI job.
- name: result
type: string
description: >
CI job result.
- name: url
type: string
description: >
Full URL to the CI job on the CI master.
- name: artifacts
type: group
description: >
List of the artifacts of the build.
The console output in case of Jenkins is considered an artifact with name
`consoleText`.
fields:
- name: name
type: string
description: >
file name of the artifact
- name: url
type: string
description: >
URL to the html log of the CI job on cold storage.
- name: original_url
type: string
description: >
URL to the html log of the CI job on the CI server.
6 changes: 1 addition & 5 deletions namespaces/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,9 @@ namespace:
name: docker
type: group
description: >
Docker container group
Namespace for docker container-specific metadata
fields:
- name: container_id
type: string
index: not_analyzed
description: >
Docker container id
doc_sections:
- ["pod_log", "Openshift logging metadata"]
23 changes: 4 additions & 19 deletions namespaces/kubernetes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@ namespace:
name: kubernetes
type: group
description: >
Kubernetes-specific metadata.
Namespace for kubernetes-specific metadata
fields:
- name: pod_name
type: string
index: not_analyzed
description: >
The name of the pod
norms:
enabled: True
- name: labels
type: group
Expand All @@ -23,35 +20,23 @@ namespace:
- name: pod_id
type: string
index: not_analyzed
description: >
TODO
norms:
enabled: True
Kubernetes ID of the pod.
- name: namespace_name
type: string
index: not_analyzed
description: >
The name of the namespace
norms:
enabled: True
The name of the namespace in Kubernetes.
- name: namespace_id
type: string
index: not_analyzed
description: >
The name of the namespace
norms:
enabled: True
ID of the namespace in Kubernetes.
- name: host
type: string
index: not_analyzed
description: >
Kubernetes node name
norms:
enabled: True
doc_sections:
- ["pod_log", "Openshift logging metadata"]
15 changes: 7 additions & 8 deletions namespaces/pipeline_metadata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ namespace:
Everything about log collector, normalizers, mappings goes here.
Data in this subgroup is stored for troublehsooting purposes mostly.
fields:
- name: "@version"
type: string
example: TODO
description: >
Version of “com.redhat.viaq” mapping the document is intended to adhere by the normalizer. It must be set by the normalizer.
The value must correspond to the [_meta][version].
- name: collector
type: group
description: >
Expand Down Expand Up @@ -123,14 +130,6 @@ namespace:
type: string
ignore_above: 256

- name: "@version"
type: string
example: TODO
description: >
Version of “com.redhat.viaq” mapping the document is intended to adhere by the normalizer. It must be set by the normalizer.
The value must correspond to the [_meta][version].
- name: trace
type: string
doc_values: false
Expand Down
4 changes: 2 additions & 2 deletions namespaces/rsyslog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace:
name: rsyslog
type: group
description: >
rsyslog/syslog-specific metadata, excluding systemd metadata
RFC5424 based metadata.
fields:
- name: facility
type: string
Expand All @@ -25,7 +25,7 @@ namespace:
- name: msgid
type: long
description: >
rsyslog protocol version
syslog's msgid field
- name: appname
type: string
Expand Down
10 changes: 3 additions & 7 deletions namespaces/systemd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@ namespace:
name: systemd
type: group
description: >
Contains common fields specific to systemd journal
Contains common fields specific to systemd journal.
For more information please see
https://www.freedesktop.org/software/systemd/man/systemd.journal-fields.html
fields:
- name: CEE
type: group
product_subgroup: True
description: >
Previously a CEE structure as it comes from rsyslog.
TODO: come up with a good name as CEE is very specific to syslog
- name: k
type: group
description: >
Expand Down
Loading

0 comments on commit 03c42a5

Please sign in to comment.