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

feat: enhance the demo with syslog telemetries #145

Closed
wants to merge 1 commit into from
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
1 change: 1 addition & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
curl --fail http://127.0.0.1:9091/api/v1/query?query=disk_used_percent | grep disk_used_percent
curl --fail http://127.0.0.1:9091/api/v1/query?query=netstat_tcp_listen | grep netstat_tcp_listen
curl --fail http://127.0.0.1:9091/api/v1/query?query=dns_query_result_code | grep dns_query_result_code
curl --fail http://127.0.0.1:9091/api/v1/query?query=syslog_version | grep syslog_version

- name: Logs
if: always()
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ curl --fail http://127.0.0.1:9091/api/v1/query?query=redfish_thermal_fans_readin
curl --fail http://127.0.0.1:9091/api/v1/query?query=disk_used_percent | grep disk_used_percent
curl --fail http://127.0.0.1:9091/api/v1/query?query=netstat_tcp_listen | grep netstat_tcp_listen
curl --fail http://127.0.0.1:9091/api/v1/query?query=dns_query_result_code | grep dns_query_result_code
curl --fail http://127.0.0.1:9091/api/v1/query?query=syslog_version | grep syslog_version
```

## Running example
Expand Down
10 changes: 10 additions & 0 deletions config/rsyslog.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
$ActionQueueType LinkedList # use asynchronous processing
$ActionQueueFileName srvrfwd # set file name, also enables disk mode
$ActionResumeRetryCount -1 # infinite retries on insert failure
$ActionQueueSaveOnShutdown on # save in-memory data if rsyslog shuts down

# forward over tcp with octet framing according to RFC 5425
*.* @@(o)127.0.0.1:6514;RSYSLOG_SyslogProtocol23Format

# uncomment to use udp according to RFC 5424
*.* @127.0.0.1:6514;RSYSLOG_SyslogProtocol23Format
3 changes: 3 additions & 0 deletions config/telegraf.conf
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
servers = ["8.8.8.8"]
include_fields = ["all_ips"]

[[inputs.syslog]]
server = "udp://:6514"

[[outputs.file]]
files = ["stdout"]
data_format = "influx"
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,16 @@ services:
timeout: 10s
retries: 5

syslog:
image: rsyslog/syslog_appliance_alpine
volumes:
- ./config/rsyslog.conf:/etc/rsyslog.d/50-telegraf.conf
ports:
- "6514:6514/tcp"
- "6514:6514/udp"
networks:
- opi

volumes:
influxdb-storage:

Expand Down
Loading