![]() I'm also not sure if we have bespoke tools that do things like working out the item number or if having a webserver that can share the log files is default. Hey presto, I have the message that I can display.Drop the log reference number (first item, tab separated).Get the first record (stored so newest is at the top).Use a web-request to get the log file from the Zabbix server.Determine the Zabbix item number for the log file on the particular host I'm interested in.Wait a few minutes for the data to be picked up, ensuring that some new data is actually written to the log.Assign the template to the required hosts, although in my case the template was already on several servers so it appears in various places straight away.Create the Zabbix item in a template for the file as type log and key logrt with a history of 1 day and a refresh of 3 seconds (don't want old logs and need it reasonably up to date without hammering the servers) The logrt key allows it to cope with logs that are rotated.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 need to extract errors with specific string ( about 15 different strings - log example in attachment ). ![]() 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. Im struggling with Windows log file monitoring. The files will get quite large, but I can set the history low, because after that we just want the current position. I know I can define the Zabbix item type as log with a key of log, but then I don't know how to get at the content/last line. ![]() We don't dare have Zabbix remote commands enabled because that is an entry point to attack the server. 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. There's lots to do already when we build them. 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. It's shouldn't be too hard, but I'm stuck. 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. 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. The process producing the display doesn't have direct access to the file. Maybe I wasn't clear on the initial post. The process that creates the log file is not available to us, else I would get it to "append log" all messages as it does now and overwrite log each messages to a separate file so that there would be just a single record in the second file. We need to keep track that processing is running normally and last run timestamp, status, messages etc. I'd rather not have to set up all sorts of extra spaghetti each time we create a new server, just give it the Zabbix template and extend the list of servers in my script that knows which servers should have the log file. The item would be in a template and I can write something to read the items in rather than have to set up SSH keys all over the place and collect them by shell script. Logged on Users on Windows PCs and Servers I will deploy the Zabbix agent (allowing both active and passive checks) to our Workstations (W10Pro in AD environment) and servers (WS2016+) but first I’m trying to create the correct items/values to some test computers. We use zabbixsender to send the found data to the zabbix server. I just want to be able to use Zabbix to collect it. but try this: logrobot autonda /log/file/path 60m. im trying to think off the top of my head how to do that. I don't want to graph it because it will be text such as a timestamp and message. now to also monitor and alert if theres any output, that is possible as well. Trying to set the start line to $ of -1doesn't seem to help me.Ĭan anyone send me in the right direction to get the last line of a simple text file recorded as a Zabbix item. My process to pick it up just comes back with unknown item. Redirect output to file and feed with it Zabbix.And other variations without success. If you need a list of changed files, you can get it with fossil changes -abs-paths -hash -header -v You will get list of new (untracked) files. Then if you would run from scheduler fossil extras -dotfiles You can run periodically from scheduler fossil-scm, it is kinda like git, but much simpler and all its functionality is in one single file without any dependencies (BTW, invented by the same author who made SQLite).įirst, you need to create initial snapshot cd /to/directory/that/need/to/be/tracked
0 Comments
Leave a Reply. |