While running the wizard locally you will see a statistics box displayed showing the hi and low statistics of file age, size, and count of the specified directory. In Step 3 we will fill in the information for the wizard options and what services will be used for this directory and host. Username: This is the username that was setup on the remote host for passwordless access using a SSH key. SSH: This will run the wizard on the indicated server address. Server Address: The address of the remote host the directory is located. If running the wizard locally, uncheck the SSH checkbox and click Next. Navigate to the Nagios Log Server Wizard by selecting Configure > Run the Monitoring Wizard > Folder Watch Configureįolder to Watch: First indicate the full path to the directory that you want to configure the wizard for. If you plan on using this wizard on the Nagios XI host locally then the above setup is not required. The final step of the guide will ask you to log in to test the connection and this is an important step in allowing the Folder Watch wizard to access the server after the user accepts the rsa key. If you are planning on using the Folder Watch wizard on remote hosts you will have to follow the guide for each remote host, the guide is located here: Nagios has created a guide for specifically monitoring a remote machine over SSH with Nagios XI. It should be noted that when running this wizard on a remote host using SSH it is required that users set up passwordless access to the remote host. It will describe how to configure the wizard and how to customize the wizard using search patterns and wildcards to get a picture of a file system. If err := w.AddRecursive(".This document describes how a user can take advantage of the Folder Watch wizard in Nagios XI. Watch test_folder recursively for changes. W.AddFilterHook(watcher.RegexFilterHook(r, false))įmt.Println(event) // Print the event's info. Only files that match the regular expression during file listings W.FilterOps(watcher.Rename, watcher.Move) If SetMa圎vents is not set, the default is to send all events. on the Event channel per watching cycle. SetMa圎vents to 1 to allow at most 1 event's to be received Limit amount of events that can be received per watching cycle.Notifies the full path of the file that the event is based on or the old and new paths if the event was a Rename or Move event.Notifies the os.FileInfo of the file that the event is based on.Choose to ignore specified files and folders.Watch folders recursively or non-recursively.Installation go get -u /radovskyb/watcher/. Event.Path for Rename and Move events is now returned in the format of fromPath -> toPathĬhmod event is not supported under windows.Added new file filter hooks (Including a built in regexp filtering hook).Installation Features Example Contributing Watcher Command Update Watcher watches for changes and notifies over channels either anytime an event or an error has occurred.Įvents contain the os.FileInfo of the file or directory that the event is based on and the type of event and file or directory path. Watcher is a Go package for watching for files or directory changes (recursively or non recursively) without using filesystem events, which allows it to work cross platform consistently.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |