News:

We really need your input in this questionnaire

Main Menu
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

#6226
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
#6227
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
#6228
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
#6229
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
#6230
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
#6231
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
#6232
Hi!

You can add additional parameters to agent using ExternalParameter config file option. For example, you can add to nxagentd.conf on some node


ExternalParameter = WebVersion:wget -qO- https://www.netxms.org/download | perl -e 'while(<>) { chomp $$_; if ($$_ =~ /stable version is ([0-9\.]+)\,/) { print "$$1\n"; } }'


After that, agent will provide additional parameter named WebVersion. You can get value of this parameter by creating new DCI on this node, and create thresholds to detect value changes.

Best regards,
Victor
#6233
Hi!

You can safely ignore them. It's a side effect of applying system templates. I'll fix it in next release.

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

Пока по прежнему нет поддержки перекрывающихся IP :( Буду делать в 1.1.x ветке.
#6235
Стандартных средств для этого нет. Можно написать простенькую программку на С или Java, которая будет через API подключаться к серверу и забирать данные в локальный файл.
#6236
Общие вопросы / Re: Trap/VarBind
December 23, 2010, 02:02:26 PM
Проблема в том, что NetXMS рассматривает тип OCTET STRING как текст, что не всегда правильно. snmpwalk проверяет строку на наличие непечатаемых символов, и если они есть, печатает всю строку как Hex-String. Я думаю в настройках SNMP трапов добавить опцию возвращать результат как hex string, тогда дальше можно будет сделать необходиимую обработку скриптами.
#6237
Hi!

Yes, it's a bug in libnetxms. Please replace file src/libnetxms/string.cpp with attached one and recompile. This bug affects only Solaris and AIX.

Best regards,
Victor
#6238
General Support / Re: Clustering with SNMP Proxy
December 22, 2010, 01:39:06 PM
Hi!

The only possible initialization of array is like

monitornodes[1] = "system-1";
monitornodes[2] = "system-2";
monitornodes[2] = "system-3";

I like the idea of having array initializers, I will add it to NXSL. Also, your script has an error if for loop condition - it should be monitornodes != NULL, not monitornodes != NULL. So, correct version of the script should looks like this:


array monitornodes;

monitornodes[1] = "system-1";
monitornodes[2] = "system-2";
monitornodes[2] = "system-3";

summary=0;
for (i=1; monitornodes[i] != NULL ; i++)
{
  inode = FindNodeObject($node, monitornodes[i]);
  ivalue = GetDCIValue(inode, FindDCIByDescription(inode, "TotalAuth"));
  summary += ivalue;
}

return summary;


Best regards,
Victor
#6239
Общие вопросы / Re: Trap/VarBind
December 20, 2010, 10:46:19 PM
V internete nashel tol'ko takuju informaciju po etomu varbindu:

swL2macNotifyInfo   OBJECT-TYPE
        SYNTAX  OCTET STRING(SIZE (0..1024))
        MAX-ACCESS  read-only
        STATUS  current
        DESCRIPTION
            "This object indicates the last time reboot information.
            "
        ::= { swl2NotificationBidings 1 }   

V ljubom sluchae pohoze chto tam ne tekstovaja informacija. Esli znat' format, to mozno poprobovat' preobrazovat' ee v normal'nij vid pri pomoschi NXSL skripta. Esli ne pomozet, to nado budet delat' patch - v ljubom sluchae polezno budet dobavit' normal'nij processing binarnih dannih v varbindah. Bilo bi ochen' polezno uznat' bse ze detal'nij format etogo polja, po baitam - skol'ko bait kakaja chast' zanimaet i v kakom formate hranitsja.
#6240
So you are trying to build agent for WinCE? Then yes, you need to compile it in UNICODE, because WinCE lacks non-unicode versions of most API calls.