Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support mongodb on k8s #294

Merged
merged 2 commits into from
Aug 5, 2021
Merged

support mongodb on k8s #294

merged 2 commits into from
Aug 5, 2021

Conversation

jsirianni
Copy link
Member

  • Added source parameter for selecting file or k8s input
  • Added cluster, container, pod inputs when using kubernetes
  • Set non json format output to regex, which was implicitly set before due to pipeline order
{
  "level": "info",
  "timestamp": "2021-07-21T17:59:09.217Z",
  "message": "Starting stanza agent"
}

{
  "level": "info",
  "timestamp": "2021-07-21T17:59:09.428Z",
  "message": "Stanza agent started"
}

{
  "level": "info",
  "timestamp": "2021-07-21T17:59:09.629Z",
  "message": "Started watching file from end. To read preexisting logs, configure the argument 'start_at' to 'beginning'",
  "operator_id": "$.mongodb.kubernetes_input.container_reader",
  "operator_type": "file_input",
  "path": "/var/log/containers/mongodb-5cc4698795-zvfbg_default_mongodb-b346c5f0b7c004aca6e56cdbea0ab1d4dc27075031cfb554a8501f70accd655b.log"
}

{
  "timestamp": "2021-07-21T17:59:14.894Z",
  "severity": 30,
  "severity_text": "I",
  "labels": {
    "k8s-pod/app": "mean-stack",
    "k8s-pod/component": "mongodb",
    "k8s-pod/pod-template-hash": "5cc4698795",
    "log_type": "k8s.container",
    "plugin_id": "kubernetes_input",
    "stream": "stdout"
  },
  "resource": {
    "k8s.cluster.name": "",
    "k8s.container.id": "b346c5f0b7c004aca6e56cdbea0ab1d4dc27075031cfb554a8501f70accd655b",
    "k8s.container.name": "mongodb",
    "k8s.deployment.name": "mongodb",
    "k8s.namespace.name": "default",
    "k8s.namespace.uid": "08963f4e-7ef0-44a5-9ba6-ca18b14c7969",
    "k8s.node.name": "",
    "k8s.pod.name": "mongodb-5cc4698795-zvfbg",
    "k8s.pod.uid": "efb20850-8323-41da-82af-e8b67bc0dd40",
    "k8s.replicaset.name": "mongodb-5cc4698795"
  },
  "record": {
    "attr": {
      "message": "[1626890354:894490][1:0x7f708bf03700], WT_SESSION.checkpoint: [WT_VERB_CHECKPOINT_PROGRESS] saving checkpoint snapshot min: 165, snapshot max: 165 snapshot count: 0, oldest timestamp: (0, 0) , meta checkpoint timestamp: (0, 0)"
    },
    "component": "STORAGE",
    "context": "Checkpointer",
    "id": 22430,
    "message": "WiredTiger message"
  }
}

@jsirianni jsirianni requested a review from schmikei July 21, 2021 18:04
Copy link
Contributor

@ericwholt ericwholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

plugins/mongodb.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@ericwholt ericwholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@jsirianni jsirianni merged commit 089fb90 into master Aug 5, 2021
@jsirianni jsirianni deleted the mongodb-k8s branch August 5, 2021 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants