Slackbot
01/14/2023, 11:56 AMApoorva
01/14/2023, 11:58 AMPranay
Apoorva
01/14/2023, 12:02 PMPranay
Nityananda Gohain
01/14/2023, 12:04 PMApoorva
01/14/2023, 12:07 PMPranay
Apoorva
01/14/2023, 12:10 PMglobal:
storageClass: gp2-resizable
clickhouse:
cloud: aws
storageClass: gp2-resizable
k8s-infra:
# -- Whether to enable K8s infra monitoring
enabled: true
# -- Endpoint/IP Address of the SigNoz or any other OpenTelemetry backend.
# Set it to `<http://ingest.signoz.io:4317|ingest.signoz.io:4317>` for SigNoz SaaS.
#
# If set to null and the chart is installed as dependency, it will attempt
# to autogenerate the endpoint of SigNoz OtelCollector.
otelCollectorEndpoint: null
# -- Whether the OTLP endpoint is insecure.
# Set this to false, in case of secure OTLP endpoint.
otelInsecure: true
# -- API key of SigNoz SaaS
signozApiKey: ""
# -- Kubernetes cluster domain used when k8s-infra component installed in different namespace
clusterDomain: cluster.local
# -- Which namespace to install k8s-infra components.
# By default installed to the namespace same as the chart.
namespace: ""
# Default values for OtelAgent
otelAgent:
name: "otel-agent"
image:
registry: <http://docker.io|docker.io>
repository: otel/opentelemetry-collector-contrib
tag: 0.62.0
pullPolicy: IfNotPresent
imagePullSecrets: []
# OpenTelemetry Collector executable
command:
# -- OtelAgent command name
name: /otelcol-contrib
# -- OtelAgent command extra arguments
extraArgs: []
configMap:
# -- Specifies whether a configMap should be created (true by default)
create: true
# OtelAgent service
service:
# -- Annotations to use by service associated to OtelAgent
annotations: {}
# -- Service Type: LoadBalancer (allows external access) or NodePort (more secure, no extra cost)
type: ClusterIP
# -- Configure resource requests and limits. Update according to your own use
# case as these values might not be suitable for your workload.
# ref: <http://kubernetes.io/docs/user-guide/compute-resources/>
# @default -- See `values.yaml` for defaults
resources:
requests:
cpu: 100m
memory: 100Mi
# limits:
# cpu: 1000m
# memory: 1Gi
# -- Configurations for OtelAgent
# @default -- See `values.yaml` for defaults
config:
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
hostmetrics:
collection_interval: 30s
scrapers:
cpu: {}
load: {}
memory: {}
disk: {}
filesystem: {}
network: {}
kubeletstats:
collection_interval: 60s
auth_type: "serviceAccount"
endpoint: "${K8S_NODE_NAME}:10250"
insecure_skip_verify: true
filelog/k8s:
exclude:
- /var/log/pods/kube-system_*/*/*.log
- /var/log/pods/*_hotrod-*/*/*.log
- /var/log/pods/*_locust-*_*/*/*.log
include:
- /var/log/pods/*/*/*.log
include_file_name: false
include_file_path: true
operators:
- id: get-format
routes:
- expr: body matches "^\\{"
output: parser-docker
- expr: body matches "^[^ Z]+ "
output: parser-crio
- expr: body matches "^[^ Z]+Z"
output: parser-containerd
type: router
- id: parser-crio
output: extract_metadata_from_filepath
regex: ^(?P<time>[^ Z]+) (?P<stream>stdout|stderr) (?P<logtag>[^ ]*) ?(?P<log>.*)$
timestamp:
layout: "2006-01-02T15:04:05.000000000-07:00"
layout_type: gotime
parse_from: attributes.time
type: regex_parser
- id: parser-containerd
output: extract_metadata_from_filepath
regex: ^(?P<time>[^ ^Z]+Z) (?P<stream>stdout|stderr) (?P<logtag>[^ ]*) ?(?P<log>.*)$
timestamp:
layout: '%Y-%m-%dT%H:%M:%S.%LZ'
parse_from: attributes.time
type: regex_parser
- id: parser-docker
output: extract_metadata_from_filepath
timestamp:
layout: '%Y-%m-%dT%H:%M:%S.%LZ'
parse_from: attributes.time
type: json_parser
- id: extract_metadata_from_filepath
parse_from: attributes["log.file.path"]
regex: ^.*\/(?P<namespace>[^_]+)_(?P<pod_name>[^_]+)_(?P<uid>[a-f0-9\-]+)\/(?P<container_name>[^\._]+)\/(?P<restart_count>\d+)\.log$
type: regex_parser
- id: get-json
routes:
- expr: attributes["k8s.namespace.name"] == "services"
output: parser-nucash-json
type: router
- id: parser-nucash-json
parse_from: attributes.log
type: json_parser
- from: attributes.log
to: body
type: move
prometheus:
config:
global:
scrape_interval: 60s
scrape_configs:
- job_name: otel-agent
static_configs:
- targets:
- ${MY_POD_IP}:8888
processors:
batch:
send_batch_size: 5000
timeout: 5s
# Resource detection processor config.
# ref: <https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/resourcedetectionprocessor/README.md>
resourcedetection:
detectors: [env, system, eks, ec2] # Include ec2/eks for AWS, gce/gke for GCP and azure/aks for Azure
# Using OTEL_RESOURCE_ATTRIBUTES envvar, env detector adds custom labels
timeout: 2s
system:
hostname_sources: [os] # Alternatively, use [dns,os] for setting FQDN as host.name and os as fallback
# Memory Limiter processor config.
# If set to null, will be overridden with values based on k8s resource limits.
# ref: <https://github.com/open-telemetry/opentelemetry-collector/tree/main/processor/memorylimiterprocessor>
memory_limiter: null
extensions:
health_check:
endpoint: 0.0.0.0:13133
zpages:
endpoint: localhost:55679
pprof:
endpoint: localhost:1777
exporters:
otlp:
endpoint: ${OTEL_EXPORTER_OTLP_ENDPOINT}
tls:
insecure: ${OTEL_EXPORTER_OTLP_INSECURE}
headers:
"signoz-access-token": "Bearer ${SIGNOZ_API_KEY}"
service:
telemetry:
metrics:
address: 0.0.0.0:8888
extensions: [health_check, zpages]
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [otlp]
metrics:
receivers: [otlp]
processors: [batch]
exporters: [otlp]
metrics/generic:
receivers: [hostmetrics, prometheus, kubeletstats]
processors: [resourcedetection, batch]
exporters: [otlp]
logs:
receivers: [filelog/k8s, otlp]
processors: [batch]
exporters: [otlp]
Nityananda Gohain
01/14/2023, 12:18 PMNityananda Gohain
01/14/2023, 12:24 PMApoorva
01/14/2023, 12:24 PMNityananda Gohain
01/14/2023, 12:25 PMNityananda Gohain
01/14/2023, 12:26 PMNityananda Gohain
01/14/2023, 12:27 PMNityananda Gohain
01/14/2023, 12:27 PMApoorva
01/14/2023, 12:39 PMAnkit Nayan
logs_resource_keys
helpedApoorva
01/16/2023, 7:30 AMnitya-signoz
01/16/2023, 7:32 AMfilelog/k8s
receiverApoorva
01/16/2023, 7:35 AMnitya-signoz
01/16/2023, 7:38 AMApoorva
01/16/2023, 7:39 AMnitya-signoz
01/16/2023, 7:39 AMApoorva
01/16/2023, 7:40 AMnitya-signoz
01/16/2023, 9:06 AMPrashant Shahi
01/16/2023, 9:06 AMnitya-signoz
01/16/2023, 9:06 AMApoorva
01/16/2023, 9:21 AM<https://platform.dev1.nucash.net/api/v1/logs?q=k8s_namespace_name+IN+(%27services%27)&limit=25&orderBy=timestamp&order=desc×tampStart=1673860453456000000×tampEnd=1673860753456000000>
Query String Parameters
q: k8s_namespace_name IN ('services')
limit: 25
orderBy: timestamp
order: desc
timestampStart: 1673860453456000000
timestampEnd: 1673860753456000000
Is giving response
{
"results": []
}
nitya-signoz
01/16/2023, 9:23 AMshow create table signoz_logs.logs
Apoorva
01/16/2023, 9:24 AMCREATE TABLE signoz_logs.logs
(
`timestamp` UInt64 CODEC(DoubleDelta, LZ4),
`observed_timestamp` UInt64 CODEC(DoubleDelta, LZ4),
`id` String CODEC(ZSTD(1)),
`trace_id` String CODEC(ZSTD(1)),
`span_id` String CODEC(ZSTD(1)),
`trace_flags` UInt32,
`severity_text` LowCardinality(String) CODEC(ZSTD(1)),
`severity_number` UInt8,
`body` String CODEC(ZSTD(2)),
`resources_string_key` Array(String) CODEC(ZSTD(1)),
`resources_string_value` Array(String) CODEC(ZSTD(1)),
`attributes_string_key` Array(String) CODEC(ZSTD(1)),
`attributes_string_value` Array(String) CODEC(ZSTD(1)),
`attributes_int64_key` Array(String) CODEC(ZSTD(1)),
`attributes_int64_value` Array(Int64) CODEC(ZSTD(1)),
`attributes_float64_key` Array(String) CODEC(ZSTD(1)),
`attributes_float64_value` Array(Float64) CODEC(ZSTD(1)),
`k8s_container_name` String MATERIALIZED attributes_string_value[indexOf(attributes_string_key, 'k8s_container_name')] CODEC(LZ4),
`message` String MATERIALIZED attributes_string_value[indexOf(attributes_string_key, 'message')] CODEC(LZ4),
`level` String MATERIALIZED attributes_string_value[indexOf(attributes_string_key, 'level')] CODEC(LZ4),
`msg` String MATERIALIZED attributes_string_value[indexOf(attributes_string_key, 'msg')] CODEC(LZ4),
`errmsg` String MATERIALIZED attributes_string_value[indexOf(attributes_string_key, 'errmsg')] CODEC(LZ4),
`func` String MATERIALIZED attributes_string_value[indexOf(attributes_string_key, 'func')] CODEC(LZ4),
`component` String MATERIALIZED attributes_string_value[indexOf(attributes_string_key, 'component')] CODEC(LZ4),
`file` String MATERIALIZED attributes_string_value[indexOf(attributes_string_key, 'file')] CODEC(LZ4),
`k8s_namespace_name` String MATERIALIZED attributes_string_value[indexOf(attributes_string_key, 'k8s_namespace_name')] CODEC(LZ4),
INDEX body_idx body TYPE tokenbf_v1(10240, 3, 0) GRANULARITY 4,
INDEX id_minmax id TYPE minmax GRANULARITY 1,
INDEX message_idx message TYPE bloom_filter(0.01) GRANULARITY 64,
INDEX level_idx level TYPE bloom_filter(0.01) GRANULARITY 64,
INDEX component_idx component TYPE bloom_filter(0.01) GRANULARITY 64,
INDEX k8s_container_name_idx k8s_container_name TYPE bloom_filter(0.01) GRANULARITY 64,
INDEX k8s_namespace_name_idx k8s_namespace_name TYPE bloom_filter(0.01) GRANULARITY 64
)
ENGINE = MergeTree
PARTITION BY toDate(timestamp / 1000000000)
ORDER BY (timestamp, id)
TTL toDateTime(timestamp / 1000000000) + toIntervalSecond(86400)
SETTINGS index_granularity = 8192
nitya-signoz
01/16/2023, 9:27 AMk8s_namespace_name
materialized column is reading from the attributes
which was populated previously and now is empty for the new data because of which this is happening. Let me get back with a proper solution for this.Srikanth Chekuri
01/16/2023, 11:27 AMnitya-signoz
01/16/2023, 11:29 AMSrikanth Chekuri
01/16/2023, 11:31 AMApoorva
01/16/2023, 1:45 PMApoorva
01/16/2023, 2:07 PM- id: extract_metadata_from_filepath
parse_from: attributes["log.file.path"]
regex: ^.*\/(?P<namespace>[^_]+)_(?P<pod_name>[^_]+)_(?P<uid>[a-f0-9\-]+)\/(?P<container_name>[^\._]+)\/(?P<restart_count>\d+)\.log$
type: regex_parser
- id: get-json
routes:
- expr: attributes.namespace == "services" || attributes.namespace == "staging"
output: parser-nucash-json
type: router
- id: parser-nucash-json
parse_from: attributes.log
type: json_parser
- from: attributes.log
to: body
type: move
nitya-signoz
01/16/2023, 2:39 PMnitya-signoz
01/16/2023, 2:41 PMApoorva
01/17/2023, 5:20 AMPrashant Shahi
01/17/2023, 5:21 AMPrashant Shahi
01/17/2023, 5:22 AMApoorva
01/17/2023, 5:27 AMsignoz-override.yaml
, I tried to change the value of k8s-infra.presets.operators
2. Ran a command helm --namespace platform upgrade --install signoz signoz/signoz -f signoz-override.yaml
3. This used to update the configmap of infra-agent, but now whatever I set in k8s-infra.presets.operators and run the above command, configmap is not being updated
4. So to solve this I updated the configmap manually, and refreshed the pods
My updated configmap
https://signoz-community.slack.com/archives/C01HWQ1R0BC/p1673698255328439?thread_ts=1673697393.250009&cid=C01HWQ1R0BCPrashant Shahi
01/17/2023, 3:10 PMPrashant Shahi
01/17/2023, 3:27 PMoverride-values.yaml
with the latest values.yaml
changes in signoz and sometimes k8s-infra charts.
https://github.com/SigNoz/charts/blob/signoz-0.9.0/charts/signoz/values.yaml
https://github.com/SigNoz/charts/blob/k8s-infra-0.5.0/charts/k8s-infra/values.yaml
^ replace signoz-0.9.0
and k8s-infra-0.5.0
with respective chart versions of signoz and k8s-infra chartsPrashant Shahi
01/30/2023, 5:13 AMPrashant Shahi
01/30/2023, 5:14 AM