how to send a message to external syslog

Any IBM i topic that does not fit in another forum
Post Reply
f.cerbini
Posts: 2
Joined: Wed Nov 26, 2025 10:58 am

how to send a message to external syslog

Post by f.cerbini »

Hi
now is possible to read a log in as400 with SQL and obtain
a syslog field compliance RFC5424

SELECT
message_id, message_timestamp, from_job,
message_tokens, message_text,
syslog_event
FROM TABLE (QSYS2.HISTORY_LOG_INFO(
START_TIME => CURRENT_TIME - 1 HOURS,
END_TIME => CURRENT_TIME,
GENERATE_SYSLOG =>'RFC5424'
) )

there is a way to send output to a external syslog server
which is listening on port 514 ?

Thank you
Scott Klement
Site Admin
Posts: 952
Joined: Sun Jul 04, 2021 5:12 am

Re: how to send a message to external syslog

Post by Scott Klement »

I assume there are utilities for logging things to syslog from within PASE. Why not use one of those?

that said, I haven't tried it. I have never had a reason to write to syslog from IBM i.
f.cerbini
Posts: 2
Joined: Wed Nov 26, 2025 10:58 am

Re: how to send a message to external syslog

Post by f.cerbini »

Hi Scott
Happy to read you, thanks for your reply.

I tried with PASE but I'm missing some pieces and above all some knowledge
maybe you can help me
I have the required licensed program 5733SC1 installed, I edited the file /QOpenSys/etc/syslog.conf adding the syslog server put for example @192.168.1.10
But I didn't find the *syslog server to do the commands
ENDTCPSVR SERVER(*SYSLOG)
STRTCPSVR SERVER(*SYSLOG)

Then I had to verify that in WRKACTJOB SBS(QSYSWRK) there is type QSYSLOGD
Thank you, I hope you can help me
Scott Klement
Site Admin
Posts: 952
Joined: Sun Jul 04, 2021 5:12 am

Re: how to send a message to external syslog

Post by Scott Klement »

5733SC1 is openssl, isn't it? What does that have to do with syslog??
Post Reply