PiRSquared17 / snaketail-net

Automatically exported from code.google.com/p/snaketail-net
1 stars 0 forks source link

Tail remote server EventLog #30

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
- Be able to specify which server we want to monitor.
- Server name should be part of the tab so that we can tell which is which.

Original issue reported on code.google.com by peter@dalinis.com on 4 Mar 2013 at 7:43

GoogleCodeExporter commented 9 years ago
Are you talking about the Application EventLog ?

Open the Application EventLog, then find a log-entry from the server and 
right-click the "Source"-cell and choose "Add Filter (Server Name)".

Then right click again in the window and choose "View Options" and change the 
"Window Title" to the server-name.

Now save the session xml-file (File-menu -> Save Session...), so you can easily 
open the configured views again.

If you have multiple servers writing to the Application EventLog, then just 
configure more log-windows.

Original comment by sweaty1 on 4 Mar 2013 at 7:58

GoogleCodeExporter commented 9 years ago
I would like to monitor the logs of 3 different remote servers in addition to 
my local machine.

Original comment by peter@dalinis.com on 4 Mar 2013 at 8:26

GoogleCodeExporter commented 9 years ago
SnakeTail is able to monitor a log on a file-share, but if the connection is 
bad (Network timeouts, disconnects, etc.) then SnakeTail might behave badly.

Original comment by sweaty1 on 4 Mar 2013 at 8:29

GoogleCodeExporter commented 9 years ago
Something similar to this:

C:\Utils\snaketail-net>svn diff
Index: SnakeTail/EventLogForm.cs
===================================================================
--- SnakeTail/EventLogForm.cs   (revision 189)
+++ SnakeTail/EventLogForm.cs   (working copy)
@@ -96,7 +96,7 @@
         {
             try
             {
-                _eventLog = new EventLog(tailConfig.FilePath);
+                _eventLog = new EventLog(tailConfig.FilePath, tailConfig.Mac
hineName);
                 _eventLog.EntryWritten += new EntryWrittenEventHandler(_even
tLog_EntryWritten);
                 _eventLog.EndInit();
                 if (_eventLog.Entries.Count == -1)
Index: SnakeTail/TailConfig.cs
===================================================================
--- SnakeTail/TailConfig.cs     (revision 189)
+++ SnakeTail/TailConfig.cs     (working copy)
@@ -163,6 +163,17 @@

     public class TailFileConfig
     {
+        private string _machineName;
+        public string MachineName
+        {
+            get {
+                if (string.IsNullOrEmpty(_machineName))
+                    _machineName="localhost";
+                return _machineName;
+            }
+            set { _machineName = value; }
+        }
+
         public string FilePath { get; set; }
         public string FileEncoding { get; set; }
         public int FileCacheSize { get; set; }

Original comment by peter@dalinis.com on 4 Mar 2013 at 8:54

GoogleCodeExporter commented 9 years ago
Ok now I understand what you mean. I have updated the title of the issue.

I guess it should not be that difficult. Will try and see what happens 
(permissions etc.)

Original comment by sweaty1 on 4 Mar 2013 at 9:12

GoogleCodeExporter commented 9 years ago
Been playing around with the EventLog object, and it seems I have to upgrade to 
the EventLogReader to allow access to EventLogs on remote machines running 
newer version of Microsoft Windows. This would break compatibility with .NET 
2.0, and I guess it will take 5 more years to get WinXP completely killed.

Think this will be another ticket for the rewrite of SnakeTail.

Original comment by sweaty1 on 11 Mar 2013 at 8:19

GoogleCodeExporter commented 9 years ago
Issue 62 has been merged into this issue.

Original comment by sweaty1 on 24 Oct 2013 at 5:40