Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/_include/log-shipping/certificate.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ For HTTPS shipping, download the Logz.io public certificate to your certificate


```shell
sudo curl https://raw.githubusercontent.com/logzio/public-certificates/master/AAACertificateServices.crt --create-dirs -o /etc/pki/tls/certs/COMODORSADomainValidationSecureServerCA.crt
sudo curl https://raw.githubusercontent.com/logzio/public-certificates/master/AAACertificateServices.crt --create-dirs -o /etc/pki/tls/certs/AAACertificateServices.crt
```
2 changes: 1 addition & 1 deletion docs/_include/log-shipping/syslog-filebeat.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
output.logstash:
hosts: ["<<LISTENER-HOST>>:5015"]
ssl:
certificate_authorities: ['/etc/pki/tls/certs/COMODORSADomainValidationSecureServerCA.crt']
certificate_authorities: ['/etc/pki/tls/certs/AAACertificateServices.crt']
```
2 changes: 1 addition & 1 deletion docs/_include/log-shipping/validate-yaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ When you're done adding your sources, click **Make the config file** to download

You can compare it to our [sample configuration](https://raw.githubusercontent.com/logzio/logz-docs/master/shipping-config-samples/logz-filebeat-config.yml) if you have questions.

Validate the file using a YAML validator tool, such as ([Yamllint.com](http://www.yamllint.com/).
Validate the file using a YAML validator tool, such as [Yamllint.com](http://www.yamllint.com/).
46 changes: 46 additions & 0 deletions docs/_include/shipping-config-samples/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
version: "3"
services:
# Jaeger
jaeger:
image: jaegertracing/all-in-one:latest
ports:
- "16686:16686"
- "14268"
- "14250"

#Zipkin
zipkin:
image: openzipkin/zipkin
container_name: zipkin
ports:
- 9411:9411

otel-collector:
image: otel/opentelemetry-collector-contrib:latest
container_name: otel-logzio
command: ["--config=/etc/otel-collector-config.yml"]
volumes:
- ./config.yaml:/etc/otel-collector-config.yml
ports:
- "1888:1888" # pprof extension
- "8888:8888" # Prometheus metrics exposed by the collector
- "8889:8889" # Prometheus exporter metrics
- "13133:13133" # health_check extension
- "9411" # Zipkin receiver
- "55680:55679" # zpages extension
depends_on:
- jaeger
- zipkin

# Expose the frontend on http://localhost:8081
hotrod:
image: jaegertracing/example-hotrod:latest
ports:
- "8080:8080"
- "8081:8081"
- "8082:8082"
- "8083:8083"
environment:
JAEGER_ENDPOINT: http://otel-collector:14268/api/traces
depends_on:
- otel-collector
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# configmap
apiVersion: v1
kind: ConfigMap
metadata:
name: filebeat-config
namespace: kube-system
labels:
k8s-app: filebeat
data:
filebeat.yml: |-
filebeat.autodiscover:
providers:
- type: kubernetes
node: ${NODE_NAME}
hints.enabled: true
hints.default_config:
type: container
paths:
- /var/log/containers/*-${data.kubernetes.container.id}.log
include_annotations: '*'

processors:
- add_cloud_metadata: ~
fields:
logzio_codec: ${LOGZIO_CODEC}
token: ${LOGZIO_LOGS_SHIPPING_TOKEN}
cluster: ${CLUSTER_NAME}
type: ${LOGZIO_TYPE}
fields_under_root: true
ignore_older: ${IGNORE_OLDER}
output:
logstash:
hosts: ["${LOGZIO_LOGS_LISTENER_HOST}:5015"]
ssl:
certificate_authorities: ['/etc/pki/tls/certs/AAACertificateServices.crt']
---
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# configmap
apiVersion: v1
kind: ConfigMap
metadata:
name: filebeat-config
namespace: kube-system
labels:
k8s-app: filebeat
data:
filebeat.yml: |-
filebeat.inputs:
- type: container
paths:
- /var/log/containers/*.log
processors:
- add_kubernetes_metadata:
host: ${NODE_NAME}
matchers:
- logs_path:
logs_path: "/var/log/containers/"

processors:
- add_cloud_metadata: ~
fields:
logzio_codec: ${LOGZIO_CODEC}
token: ${LOGZIO_LOGS_SHIPPING_TOKEN}
cluster: ${CLUSTER_NAME}
type: ${LOGZIO_TYPE}
fields_under_root: true
ignore_older: ${IGNORE_OLDER}
output:
logstash:
hosts: ["${LOGZIO_LOGS_LISTENER_HOST}:5015"]
ssl:
certificate_authorities: ['/etc/pki/tls/certs/AAACertificateServices.crt']
---
83 changes: 83 additions & 0 deletions docs/_include/shipping-config-samples/k8s-events.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: monitoring
name: event-exporter
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: event-exporter
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: view
subjects:
- kind: ServiceAccount
namespace: monitoring
name: event-exporter
---
apiVersion: v1
kind: ConfigMap
metadata:
name: event-exporter-cfg
namespace: monitoring
data:
config.yaml: |
logLevel: ${EXPORTER_LOG_LEVEL}
logFormat: json
route:
routes:
- match:
- receiver: "logzio"
receivers:
- name: "logzio"
webhook:
endpoint: https://${LOGZIO_LOGS_LISTENER_HOST}:8071/?token=${LOGZIO_LOGS_SHIPPING_TOKEN}&type=k8s-events
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: event-exporter
namespace: monitoring
spec:
replicas: 1
template:
metadata:
labels:
app: event-exporter
version: v1
spec:
serviceAccountName: event-exporter
containers:
- name: event-exporter
image: ghcr.io/opsgenie/kubernetes-event-exporter:v0.10
imagePullPolicy: IfNotPresent
args:
- -conf=/data/config.yaml
volumeMounts:
- mountPath: /data
name: cfg
env:
- name: LOGZIO_LOGS_SHIPPING_TOKEN
valueFrom:
secretKeyRef:
name: logzio-events-secret
key: logzio-log-shipping-token
- name: LOGZIO_LOGS_LISTENER_HOST
valueFrom:
secretKeyRef:
name: logzio-events-secret
key: logzio-log-listener
- name: EXPORTER_LOG_LEVEL
value: info
volumes:
- name: cfg
configMap:
name: event-exporter-cfg
selector:
matchLabels:
app: event-exporter
version: v1
---
Loading