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

#6211
General Support / Re: SNMP Traps handling
January 08, 2011, 07:00:24 PM
Quote from: calin.sarac on January 08, 2011, 09:44:48 AM
One question please, as long as  I was not able to execute comands or scripts from Actions section in your program could be there any connection with the present situation ?  I tried a simple command like "cmd.exe /C "mplay32"" and even it seems that is fine is not working.I tried to put the same command in a bat file and add that bat file in actions and still not working even if everything is fine (I read all your post on the forum regarding this subject and follow the recomandations).

If you are running NetXMS server as a Windows service, you will not see any GUI for the programs started by the server. If you really wish to see GUI program started by the server, you should turn on "Allow service to interact with desktop" in NetXMS Core service properties. For simple tests, I recommend you to start simple program or bat file which writes something to some file, and check content of that file.

Best regards,
Victor
#6212
General Support / Re: SNMP Traps handling
January 08, 2011, 06:52:35 PM
Hi!

As I can see from your config, you extract only one varbind from SNMP trap - with OID .1.3.6.1.4.1.2509.8.21.2.2.1.7. Value of this varbind will become event's parameter number 2, as you can see from column "No." in trap configuration's "Parameter buindings" list. But, in your event configuration and event processing policy you refer to parameter number 3 (by using macro %3 and variable $3 in script), which will always be empty string, because you don't extract anything else from trap. If you change $3 in your script to $2, it should start working.

Also, why you are using syslog parser? Do you receive anything via syslog as well?

Best regards,
Victor
#6213
Hi!

I don't understand what is the problem with Config::print. It uses wide character version of printf, so UNICODE build should print all characters correctly. Or you have problems with ANSI build?

Function StrStrip removes leading and trailing spaces and tabs from given string. It works in both ANSI and UNICODE builds. What exact problem you have?

Best regards,
Victor
#6214
General Support / Re: SNMP Traps handling
January 07, 2011, 12:12:08 PM
Could you please send me screenshots of your trap configuration, event configuration, rule in event processing policy, and record in SNMP trap log?

Best regards,
Victor
#6215
General Support / Re: SNMP Traps handling
January 06, 2011, 10:03:22 PM
Hi!

Yes, * character means "everything" - you need this if your message contains string ALARMA and not equals to it. About syntax - did you enter script exactly as I write it, with semicolon at the end? Otherwise it will fail with syntax error.

Best regards,
Victor
#6216
Dobrij den'!

Da, nado sozdat' action s tipom "Execute command on management server", i v komandnoj stroke ukazat' nxsnmpset s parametrami. Dlja togo, chtobi podstavit' adres hosta, na kotorom proizoshlo sobitie, mozno ispol'zovat' makros %a. Naprimer, chtobi perezagruzit' Nortel Passport switch, nado zapisat' 2 v .1.3.6.1.4.1.2272.1.1.8.0. Chtobi sdelat' action RestartNortelSwitch, nado ukazat' takuju komandnuju stroku:

nxsnmpset -t INTEGER %a .1.3.6.1.4.1.2272.1.1.8.0 2
#6217
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
#6218
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
#6219
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
#6220
Wide version of opendir/readdir/closedir commited to trunk. Now you can use _TDIR, struct _tdirent, _topendir, _treaddir, _tclosedir.

Best regards,
Victor
#6221
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
#6222
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
#6223
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
#6224
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
#6225
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