Dashboard and Integration
Architecture usedβ
The lab log integration reuses the existing observability stack instead of introducing an independent logging platform.
Design rationaleβ
Grafanais already part of the labLokiprovides storage and querying without adding a second UIAlloyreceives native syslog and normalizes labels before writing to Loki
Ingestion logicβ
Ingestion is split by platform to avoid ambiguity between formats:
SR OSenters through10.99.1.16:5514/udpSR Linuxenters through10.99.1.16:1514/udp
This allows:
SR OSto be handled asrfc3164SR Linuxto be handled asrfc5424
The active Alloy configuration lives in the repository file configs/logs/config.alloy.
Module filesβ
| File | Role |
|---|---|
configs/logs/config.alloy | Ingress collector; receives syslog, extracts labels, and forwards to Loki |
configs/logs/loki-config.yml | Storage, index, compactor, and retention configuration |
configs/logs/prepare.sh | Optional helper if you want to re-enable host persistence for troubleshooting |
configs/logs/loki-data/ | Optional placeholder for host persistence; unused in the default mode |
configs/logs/alloy-data/ | Optional placeholder for host persistence; unused in the default mode |
Storage mode in useβ
By default, the lab uses ephemeral storage for Loki and Alloy.
This means:
Lokiwrites inside the container filesystemAlloykeeps its state inside the container filesystem- when the lab is destroyed, this runtime data disappears with the containers
- the workspace does not accumulate persistent log data and you avoid container UID ownership issues
If you ever want to preserve logs across lab recreations, you can mount host directories again and reuse configs/logs/prepare.sh.
config.alloy explained block by blockβ
loggingβ
logging {
level = "info"
format = "logfmt"
}
This defines Alloy's own internal log level and format. It does not change the Nokia logs stored in Loki; it only helps operate the collector itself.
loki.relabel "syslog"β
This block takes metadata emitted by the syslog listener and normalizes it into queryable Loki labels:
__syslog_message_hostname->hostname__syslog_message_app_name->app_name__syslog_message_severity->severity__syslog_message_facility->facility__syslog_connection_ip_address->source_ip
It also initializes message_type from app_name so there is always at least a minimal event classification dimension even when a more specific event type cannot be extracted later.
loki.process "classify"β
This block performs platform-specific parsing:
- for
SR Linuxit uses a regex over therfc5424payload to extractpayload_level,payload_severity, andmessage_type - for
SR OSit uses a regex to capture Nokia event identifiers of the formXXXX-YYYY-ZZZ
Its purpose is not to store the raw line, but to enrich it so Grafana can group by event type without manual line-by-line inspection.
loki.source.syslog "nokia"β
This is where the actual listeners live:
0.0.0.0:5514/udpforSR OS0.0.0.0:1514/udpforSR Linux
They are separated because the formats differ:
SR OSis handled asrfc3164SR Linuxis handled asrfc5424
Each listener also sets base labels such as job, collector, transport, and source_platform.
loki.write "local"β
This is the final output to Loki:
loki.write "local" {
endpoint {
url = "http://loki:3100/loki/api/v1/push"
}
external_labels = {
lab = "small-isp-lab",
}
}
Everything Alloy receives and enriches is pushed to Loki's internal HTTP endpoint. The external label lab=small-isp-lab helps distinguish this environment if you later share a centralized Loki instance.
loki-config.yml explained block by blockβ
auth_enabled and serverβ
auth_enabled: falsekeeps the lab simple and avoids extra authentication handlinghttp_listen_port: 3100defines Loki's internal HTTP port
commonβ
Defines local storage behavior:
path_prefix: /lokisets the internal data rootreplication_factor: 1confirms a single-node deploymentring ... inmemoryavoids requiring an external KV store
schema_configβ
It uses:
store: tsdbobject_store: filesystemschema: v13period: 24h
This means Loki rotates and indexes data daily using the local filesystem, without S3 or a distributed backend.
storage_configβ
This separates two main areas:
/loki/chunksfor log data/loki/indexand/loki/index_cachefor TSDB shipper index and cache
If disk usage grows, the largest impact is usually under chunks.
limits_configβ
The most important line for a lab is:
retention_period: 1h
That is 1 hour. In the default ephemeral mode, this retention lives inside the Loki container and disappears when the lab is destroyed.
compactorβ
The compactor:
- periodically compacts data
- applies retention
- processes deletes on filesystem storage
Without this block, the configured retention would not be enforced effectively.
Retention and disk usageβ
In this lab:
- by default, growth happens inside the
Lokicontainer, not in the repo Alloyalso uses container-local ephemeral storage- with
retention_period: 1h, Loki keeps up to1 hourof logs while the container exists
Operationally this means:
- for short demos, no persistent residue is left in the workspace
- if you leave the lab running for many days generating syslog, usage will grow inside Docker storage on the host
- if you need a lighter lab, the first thing to reduce is Loki retention, not Alloy
- if you re-enable host bind mounts, growth will again appear under
configs/logs/loki-data/
Normalized labels in Lokiβ
Alloy creates labels that simplify dashboard filtering:
| Label | Purpose |
|---|---|
source_platform | sros or srlinux |
hostname | node system name |
app_name | emitting process or application |
severity | syslog severity |
facility | syslog facility |
source_ip | sender management IP |
message_type | event type; in SR Linux it falls back to app_name |
Grafana dashboardβ
The Nokia Syslog Overview dashboard was designed so daily operations do not mix both log formats unnecessarily.
Filtersβ
Sharedβ
Transport
SR OSβ
SrosHostSrosAppSrosType
SR Linuxβ
SrlHostSrlAppSrlType
Panelsβ
Log LinesActive StreamsSR OS ErrorsSR OS WarningsSR Linux ErrorsSR Linux WarningsSR OS Lines by TypeSR OS Lines by HostSR Linux Lines by AppSR Linux Lines by HostRaw Syslog - SR OSRaw Syslog - SR Linux
Configuration applied on SR OSβ
The startup-config reference is documented in:
Logical fragment:
/configure log log-id "77" description "Default System Log to Syslog"
/configure log log-id "77" source main true
/configure log log-id "77" destination syslog "1"
/configure log route-preference primary outband
/configure log syslog "1" description "syslog container"
/configure log syslog "1" address 10.99.1.16
/configure log syslog "1" facility local6
/configure log syslog "1" severity info
/configure log syslog "1" port 5514
/configure log syslog "1" hostname use-system-name
Operational resultβ
MASTERandSLAVEexport administrative and system events to Alloy- events keep the node system name
- the dashboard can filter by
BNGMASTER,BNGSLAVE,MASTER,SLAVE, and Nokia event type
Configuration applied on SR Linuxβ
The startup-config reference is documented in:
Logical fragment:
set /system grpc-server eda-mgmt admin-state disable
set /system logging network-instance mgmt
set /system logging remote-server 10.99.1.16 transport udp
set /system logging remote-server 10.99.1.16 remote-port 1514
set /system logging remote-server 10.99.1.16 format RSYSLOG_SyslogProtocol23Format
set /system logging remote-server 10.99.1.16 facility local6 priority match-above informational
Reason for the eda-mgmt adjustmentβ
During live validation, this repetitive message was observed:
sr_grpc_server ... Unable to retrieve TLS profile 'EDA'
The cause was that grpc-server eda-mgmt was enabled while referencing a TLS profile that does not exist on these nodes. To reduce unnecessary noise in Loki and Grafana, it was set to admin-state disable.
Useful queriesβ
All logs:
{job="nokia-syslog"}
Only SR OS:
{job="nokia-syslog", source_platform="sros"}
Only SR Linux:
{job="nokia-syslog", source_platform="srlinux"}
Only SR Linux warnings:
{job="nokia-syslog", source_platform="srlinux", severity="warning"}
Only SR OS errors:
{job="nokia-syslog", source_platform="sros", severity="error"}
Recommended validationβ
- Open Grafana at
http://localhost:3030 - Open the
Nokia Syslog Overviewdashboard - Confirm data exists in
Raw Syslog - SR OSandRaw Syslog - SR Linux - Filter with
SrosHost=MASTERorSrlHost=olt - Verify that warning and error panels change with the selected filters
Quick troubleshootingβ
- If you do not see SR OS logs, verify that the BNGs point to
10.99.1.16:5514/udp - If you do not see SR Linux logs, verify that
OLT,Carrier1, andCarrier2point to10.99.1.16:1514/udp - If Loki is up but Grafana shows no data, try
{job="nokia-syslog"}in Explore - If disk usage grows more than expected, inspect Docker storage usage; if you re-enabled host persistence, inspect
configs/logs/loki-data/