Menu

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.

Show posts Menu

Messages - Victor Kirhenshtein

#6181
General Support / Re: SNMP Traps handling
January 06, 2011, 07:00:43 PM
Hi!

In that case filtering script could be very simple - you just need to filter out all events which does not contain string ALARMA in text message. Assuming that you have extracted message into event parameter number 2, you need the following filtering script:


return $2 like "*ALARMA*";


or, using regular expressions


return $2 match ".*ALARMA.*";


Best regards,
Victor
#6182
General Support / Re: node down status
January 06, 2011, 06:56:57 PM
Do I understand correctly that problem is with cluster node? Or this can happen when any node is down? Also, do you use DCI transformation scripts?

Best regards,
Victor
#6183
General Support / Re: File keyword and process search
January 06, 2011, 06:54:05 PM
Is log file name represents current date and time? If yes, then for that pattern active log file can be identified as following:

<file>AMS3AutoDealerLog%H%a%d%b%Y.AMS3</file>

Logwatch will automatically switch to new file each hour.

But if log file name contains past hour, not current, then you will need to create external script which will provide logwatch with file name to parse. To use script for generating log file name, use following syntax:

<file>AMS3AutoDealerLog`my_script_name`.AMS3</file>

Best regards,
Victor
#6184
Wide version of opendir/readdir/closedir commited to trunk. Now you can use _TDIR, struct _tdirent, _topendir, _treaddir, _tclosedir.

Best regards,
Victor
#6185
General Support / Re: node down status
January 05, 2011, 12:25:37 PM
Hi!

Most likely server is overloaded for some reason. How many nodes you are monitoring? Please check queue sizes by running

nxadm -c "sh q"

on NetXMS server.

Best regards,
Victor
#6186
Hi!

I think it should not be very hard. I'll try to create TCHAR version of opendir/readdir/closedir today. I'll notify you when they will be done.

Best regards,
Victor
#6187
General Support / Re: Logwatch function
January 03, 2011, 10:27:11 PM
Yes, that means that you are running 1.0.8. I'll check this.

Best regards,
Victor
#6188
General Support / Re: SNMP Traps handling
January 03, 2011, 10:26:21 PM
Hi!

1. Looks like you need to create filtering script to perform additional filtering when creating alarms from traps. If you can tell me how important traps can be distinguished from non-important (probably different message text or error code, etc.), I can help with filtering script creation.

2. Most likely you have incorrectly configured alarm key. Ensure that it includes unique node ID (macro %i), or make it empty to disable alarm duplication checking at all.

Best regards,
Victor
#6189
General Support / Re: script a wmi query
January 03, 2011, 10:22:32 PM
Hi!

You can define new parameters in agent implemented by external script, and then collect these parameters as usual. You can use any external program as parameter handler, and first line of the command's output will be considered as parameter's value. For example, if you have script myscript.vbs and wish to define new parameter AppUsage, you can add the following line to nxagentd.conf:

ExternalParameter = AppUsage:cscript.exe //B //Nologo myscript.vbs

Restart agent, and you will have new parameter AppUsage available for collection.

Best regards,
Victor
#6190
General Support / Re: Logwatch function
December 27, 2010, 11:05:20 PM
Hi!

What version of NetXMS server you are using? There was a bug with accessing situation attributes using -> operator, but it was fixed in 1.0.8.

Best regards,
Victor
#6191
General Support / Re: NetXMS installation with Sqlite
December 27, 2010, 11:14:51 AM
For SQLite, parameter DBName is database file name. So, if you specify just "netxms", it is relative to current directory. If you run netxmsd from different directory, it will pick wrong file. You should specify fully qualified file name in DBName.

Best regards,
Victor
#6192
General Support / Re: Logwatch function
December 24, 2010, 01:29:52 PM
Hi!

There are two different problems. One is a bug in console - it does not show attributes under instances even if they exist. But your main problem is that situation attributes are read only, i.e. you cannot do s->counter = s->counter+1; in your script. I will do something to simplify that, but currently you have only two relatively complicated workarounds:

1. In matching script in the rule, set variable CUSTOM_MESSAGE to new counter value, and in "Situation" column, set attribute counter to value "%M" (without quotes).
2. Set counter's value to %{your_script}, and create script in the library which will increase the counter. For example, you can use %{IncreaseFaxCounter} and create script named IncreaseFaxCounter in script library like this:


s = FindSituation("Multiple FAXes printed", "FaxFinder");
if (s != NULL)
    return int32(s->counter) + 1;
return 1;


It will return either increased counter value or 1 if counter was not set before.

In any case you will have two rules - one for updating counter and second to match required counter value and perform required actions. You will also need to reset counter somewhere.

Best regards,
Victor
#6193
Looks like we have a lot of Solaris problems :( Please try to replace src/server/core/node.cpp with attached one and recompile server. If this will not help, please send me a core file generated after crash.

Best regards,
Victor
#6194
General Support / Re: NetXMS installation with Sqlite
December 23, 2010, 02:40:07 PM
Hi!

Maybe I'm not understand correctly, but what do you mean by "install" on Solaris or RHEL? If you are installing NetXMS server on UNIX from sources (using make install), you are supposed to create netxmsd.conf and initialize database manually, "make install" command will not do that. Or you experience this problem even after running "nxdbmgr init" for the first time?

Best regards,
Victor
#6195
General Support / Re: File keyword and process search
December 23, 2010, 02:35:57 PM
Logwatch subagent can work with changing log file names. If agent detect file name change, it reads new log file from the beginning. Also, it detects file overwrite, so if file was overwritten, it also will be scanned from the beginning. How do you log files named?

Regarding question 2 - it is application specific. I don't think there should be any performance impact. Also, there should be no problem on UNIX to read file being actively written, but it can cause application misbehavior on Windows. The only way to know it for sure is to test it.

Best regards,
Victor