LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Syslog message tagging (https://www.linuxquestions.org/questions/linux-newbie-8/syslog-message-tagging-4175631973/)

tonygrimwood 06-14-2018 08:37 PM

Syslog message tagging
 
Hi all,

We have a number of FM transmitters (with Linux controllers) that are network-connected through GSM routers, and I've got them communicating with a remote syslog server. Unfortunately these GSM boxes strip the IP address in the hostname field and replace it with their own IP. Is it possible to place an identifier in the message text field that will make the source readily identifiable? e.g. "rock-mta-tx", which would make it obvious that the message originated from the "Rock transmitter at Maungataniwah".

Can this be done, and if yes, how?

Thanks,

Tony

AwesomeMachine 06-15-2018 01:00 AM

The FM transmissions are routed through the gsm routers, which probably assign the IPs. The Linux controllers might not even be networked together, because they wouldn't need to be. Although it seems they are connected to a syslog server. I'm not intimately familiar with gsm routing, but with routing in general it seems if you want to know which hardware is involved, you need to look at the MAC for the device.

Mara 06-15-2018 01:03 AM

An easy way would be to append the host name to all messages. You can do it by a simple wrapper over syslog.

You can also try the syslog -l option that logs with the hostname only and not with the full domain name (I assume this is your case). If the hostnames are set up in unique way, this may work as you expect.


All times are GMT -5. The time now is 05:31 AM.