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

#6526
Announcements / NetXMS 1.0.0-rc2 released
March 08, 2010, 01:53:36 PM
Hi all!

Vesrion 1.0.0-rc2 is out. It fixes some build problems found in rc1, and adds possibility to search objects by comments in Windows console.

Best regards,
Victor
#6527
Ja ispravil odin bag v configure i perepakoval 1.0.0-rc2 (https://www.netxms.org/download/netxms-1.0.0-rc2.tar.gz) - poprobujte novij variant.
#6528
Hi!

Yes, you can call library script from another library script in a same way.

I'll check script saving in MS SQL a bit later.

Best regards,
Victor
#6529
Hello!

It's very strange - there are no size limitation on scripts. What database you are using?

To call one script from another, called script must be in script library, and contain function(s) other than main(). Then in calling script you should add use statement, for example:

script in library, called my_script:


sub my_function()
{
   return "some value";
}


script in event processing policy:


use my_script;

sub main()
{
   value = my_function();
   // some further processing
}


Best regards,
Victor
#6530
Please try 1.0.0-rc2 (https://www.netxms.org/download/netxms-1.0.0-rc2.tar.gz) - this problem should be fixed.

Best regards,
Victor
#6531
General Support / Re: Action to return value
March 05, 2010, 05:10:49 PM
It will require changes in very important part of code, and in turn will require additional tests - and I wouldn't want to do this until 1.0.0 release. However, I have added new attribute to DCI object - errorCount - which you can use to check from NXSL if given DCI had data collection error. This attribute will be 0 if last poll was completed succesfully, or > 0 if there was an error (will hold number of consecutive data collection errors).

Best regards,
Victor
#6532
General Support / Re: NXSL scripting
March 05, 2010, 12:55:30 PM
Hi!

It is backslash, so

println "\"";

for example will print single quotation mark character. Maybe there are other error in your script?

Best regards,
Victor
#6533
General Support / Re: skip modem from monitoring
March 03, 2010, 11:55:46 AM
Quote from: iwi on March 03, 2010, 11:43:02 AM
I thought I read the manual, but I only see %1-%99 events parameter numbers 1..99, but how can I determin what which number does? Is this the ID from Event Editor?

Numbered parameters are event-dependent, you can open Control Panel -> Events, open event of interest, and look at the description - for all predefined events there are list of parameters.

Best regards,
Victor
#6534
Добрый день!

Это баг в nxdbmgr. Он исправлен в 1.0.0-rc1 - попробуйте использовать nxdbmgr из новой версии.

Виктор
#6535
Problem with MySQL is already known, and I'll fix it in rc2. In the meantime, you could try to prefix ./configure with LDFLAGS=-lmysqlclient, like this:

LDFLAGS=-lmysqlclient ./configure --with-server --with-mysql

Nobody reports PostgreSQL problem so far. Could you please post config.log from failed PostgreSQL configuration?

Best regards,
Victor
#6536
General Support / Re: Action to return value
March 02, 2010, 07:34:25 PM
Hi!

StatusPollingInterval is a global parameter, and if you reduce it, all nodes will be polled more often. Depending on number of nodes, this may cause performance problems. One possible problem is network traffic increase, other is increased CPU and database usage. But severity of both these problems depends on number of nodes.

It's strange that you don't get data collection errors on Agent.Uptime - looks like a bug, because "data collection error" threshold should fire in that case. I'll check this.

Unfortunately all possible workarounds involves local agent. You can enable watchdog for local agent to restart it automatically in case of agent's crash, but it's workaround for workaround :) The only good solution I see is to allow status polling interval configuration for each node - it's on my todo list for some time, but I cannot promise exact version where this feature will be implemented.

Best regards,
Victor


#6537
General Support / Re: skip modem from monitoring
March 02, 2010, 07:26:01 PM
If you need to compare two values in NXSL, you should use == operator. Operator = is an assignment. So, if your script really uses = instead of ==, it's one mistake. Also, don't forget that any event passes all rules, except if matching rule contains "stop processing" option. You have to add it to your rule. Also, interface name always passed as parameter number 2 with SYS_IF_DOWN and SYS_IF_UP events, so you can compare just it's value to {5757FA85-B187-42A4-981C-7443B4ECFC90} instead of comparing full message text. So, I suggest the following rule:

event:
SYS_IF_DOWN
SYS_IF_UP

source:
any

severity:
any

script:
$2 == "{5757FA85-B187-42A4-981C-7443B4ECFC90}"

alarm:
none

actions:
none

options:
stop processing


Should work :)

Best regards,
Victor
#6538
Poprobujte zapustit' configure kak:

#LDFLAGS=-lmysqlclient ./configure --with-server --with-mysql --prefix=/usr/local --mandir=/usr/local/man --infodir=/usr/local/info/ --build=i386-portbld-freebsd8.0

Pohoze chto eto bug v configure.
#6539
A prishlite pozalujsta config.log
#6540
General Support / Re: Action to return value
February 26, 2010, 10:06:47 AM
Hi!

DCI object has the following attributes:


AttributeDescription
dataTypeDCI data type (string, integer, etc.) represented as internal numeric code
descriptionDCI description
idDCI identifier
lastPollTimeDCI last successful poll time as UNIX timestamp (number of seconds since 01.01.1970 00:00:00 UTC)
nameParameter's name
originDCI origin (NetXMS agent, SNMP, etc.) represented as internal numeric code
statusDCI status (0 = active, 1 = disabled, 2 = not supported)
systemTagDCI system tag (not available in 1.0.x versions)

So, you need lastPollTime attribute.

Please also note that there are new function called "trace", which can be very useful in debugging scripts. It takes two arguments - debug level (0 .. 9) and text, like this:

trace(1, "some message");

Text passed as second argument will appear in server's log, if given debug level less or equal current server's debug level (set by -D command line option). If debug level in trace() call set to 0, message will always be logged with INFO severity.

Best regards,
Victor