Maybe I wasn't clear on the initial post. Sorry about that. The process producing the display doesn't have direct access to the file.
We have multiple CentOS servers running various positions of our application testing programme and I'm being asked to get a display together which shows how they're all doing, batch state etc.. We destroy and re-create them all the time, but the Zabbix agent is in our VMWare template already so that is the mechanism of choice to get the data. It's shouldn't be too hard, but I'm stuck.
The server showing the display doesn't have access to the log file directly (NFS, SMB or an SSH password-less connection defined) If we did have, I could simply
tail -1 /path/to/log but because we a frequently rebuilding, I'd rather not have to add another few steps and more complexity between them. There's lots to do already when we build them. With Zabbix, I can get the file contents but only for a small file, and these log files I want to read are very large.
We don't dare have Zabbix remote commands enabled because that is an entry point to attack the server. I know I can define the Zabbix item type as log with a key of
log[/path/to/file], but then I don't know how to get at the content/last line.
The files will get quite large, but I can set the history low, because after that we just want the current position.
I'm happy to define the type as
log if I could get that to work, but all I get back is a large number.
Naturally anything I can define in Zabbix will be added to the existing template so I don't have to set that up every time too.
I'm sure I'm missing something simple,
Robin (feeling like a fool
)