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

#6196
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
#6197
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
#6198
Добрый день!

Пока по прежнему нет поддержки перекрывающихся IP :( Буду делать в 1.1.x ветке.
#6199
Стандартных средств для этого нет. Можно написать простенькую программку на С или Java, которая будет через API подключаться к серверу и забирать данные в локальный файл.
#6200
Общие вопросы / Re: Trap/VarBind
December 23, 2010, 02:02:26 PM
Проблема в том, что NetXMS рассматривает тип OCTET STRING как текст, что не всегда правильно. snmpwalk проверяет строку на наличие непечатаемых символов, и если они есть, печатает всю строку как Hex-String. Я думаю в настройках SNMP трапов добавить опцию возвращать результат как hex string, тогда дальше можно будет сделать необходиимую обработку скриптами.
#6201
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
#6202
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
#6203
Общие вопросы / 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.
#6204
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.
#6205
Общие вопросы / Re: Trap/VarBind
December 20, 2010, 02:02:23 PM
Vrode vse pravil'no. Esli viden kvadrat v tekste, to scoree vsego octet string soderzit nepechataemij tekst. Octet string ne objazatel'no oznachaet stroku, naprimer MAC adres toze vozvraschaetsja kak octet string. A mozno bilo bi prislat' opisanie trapa?
#6206
You can use wget to get content of a web page. For example, the following externa parameter returns version listed on NetXMS download page (https://www.netxms.org/download):


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


Please note, that original shell command looks like


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


but you need to duplicate $ symbol, because it is used for macro expansion in external parameter configuration.

Result of this parameter looks like following:


netxms:~ # nxget 10.0.0.90 WebVersion
1.0.8
netxms:~ #


Best regards,
Victor
#6207
General Support / Re: File keyword and process search
December 20, 2010, 12:35:33 PM
Yes, you are right - logwatch looks for new records in file. But why you need to look repeatedly for old records in a file?

Best regards,
Victor
#6208
General Support / Re: Agent PDH.CounterValue
December 20, 2010, 11:37:10 AM
Hi!

Counter name must be enclosed in quotes, like this:

PDH.CounterValue("\Web Service(Microsoft Dynamics CRM)\Total Method Requests")

because counter name contains brackets, and without quotes agent cannot parse parameter correctly.

Best regards,
Victor
#6209
Hi!

At a first glance, looks like you will need some external script. With built-in mechanisms, you can only check for entire page changes using ECS subagent. This subagent provides parameter which returns hash for given URL - so you can detect change in that page, but you cannot determine what part of the page was changed.

Best regards,
Victor
#6210
General Support / Re: File keyword and process search
December 20, 2010, 11:24:41 AM
Hi!

1. do you need to check for file existence or to search for some string inside the file? To check for file existence, you can use File.Count parameter - it returns number of files matching given name or pattern. To search for string inside file, you should setup logwatch subagent for that file.

2. Parameter Process.Count(process_name) will return you number of running processes with given name. You can schedule DCI to be collected once per hour, and generate event if it is running (or not running).

Best regards,
Victor