Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - tickett

Pages: [1]
1
General Support / Re: Testing logwatch regular expressions
« on: April 29, 2019, 06:29:06 pm »
Brill thanks Victor- we are running NetXMS on Windows, so may be a little different but I will look into your suggestions.

Meanwhile I figured rather than trying to write a clever regex to exclude certain things I could create rules which don't raise events. So I have ended up with something like;

Code: [Select]
  <rules>
    <rule>
      <match>Error\s\|\sOrder\shas\stimed\sout</match>
    </rule>
    <rule>
      <match>Error\s\|\sRetrieved\sPostcode:\s;</match>
    </rule>
    <rule>
      <match>Error\s\|\s(.*)</match>
      <event>100050</event>
    </rule>
  </rules>

2
General Support / Re: DCI Template manual override
« on: April 29, 2019, 10:37:26 am »
Perhaps you want to set the Server Configuration parameter ImportConfigurationonStartup to 0? This did the trick for us.

3
General Support / Testing logwatch regular expressions
« on: April 28, 2019, 10:59:50 pm »
I'm having a bit of a nightmare trying to configure some regular expressions (mainly because debugging is really tricky- having to keep restarting the agent, tweaking the xml, throwing some fake lines into the logfile etc etc).
Is there an easy way to test/troubleshoot my regular expressions?
I've used sites like https://regex101.com/ before, but it looks like the NetXMS engine works a little differently. https://www.regextester.com seemed to provide a slightly closer result but still not everything that works on there works in NetXMS.

Here an example of one I got working;
Error\s\|\s(.*)

Here's an example of one i'm struggling with (it's supposed to work similar to the above expression, matching anything after error but not if it contains the word timed);
Error\s\|\s(?!.*timed)(.*)

Any pointers would be great (as I say, rather somewhere I can test or a way in NetXMS I can debug more easily).
Thanks

4
General Support / Re: Find text string within log file
« on: April 12, 2019, 05:44:19 pm »
Thanks Victor, putting the wildcards straight in the filename as you suggested worked perfectly;

<file>C:\inetpub\wwwroot\website\logs\Log_%Y_%m_%d.txt</file>

5
General Support / Re: Find text string within log file
« on: April 12, 2019, 09:21:29 am »
    I am trying this (dynamic filename) and struggling- I have tried;
    • using a wildcard * (didn't expect it to work, but worth a longshot)
  • adding a macro (see below)
  • using backticks with an echo command directly
  • using backticks with a batch file which executes an echo command
Code: [Select]
<macro name="timestamp">%Y_%m_%d</macro>
The log file seems to show whatever I enter and doesn't appear to show a "resolved" value. Is this normal? Regardless new log entries don't appear to be picked up.

Code: [Select]
2019.04.11 09:31:02.328 *D* [logwatch           ] Parser thread for file "C:\inetpub\wwwroot\website\logs\Log_@{timestamp}.txt" stopped
2019.04.11 16:33:00.121 *D* [logwatch           ] Parser thread for file "C:\inetpub\wwwroot\website\logs\Log_`echo %date:~6,4%_%date:~3,2%_%date:~0,2%`.txt" started
2019.04.11 16:38:34.340 *D* [logwatch           ] Parser thread for file "C:\inetpub\wwwroot\website\logs\Log_*.txt" stopped
2019.04.11 16:38:34.906 *D* [logwatch           ] Parser thread for file "C:\inetpub\wwwroot\website\logs\Log_`c:\netxms\etc\date.bat`.txt" started

I have the parser working fine for the Windows Event Log.

Any ideas? TIA

6
General Support / Re: Syslog monitor in web interface not working.
« on: July 20, 2016, 06:25:16 pm »
Thanks Victor

7
same problem here in latest version 2.0.4 (works in NetXMS Management Console but not in Web Interface)

8
General Support / Re: Syslog monitor in web interface not working.
« on: July 16, 2016, 02:27:49 pm »
Same problem here latest version 2.0.4

Pages: [1]