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

#4936
А версия сервера какая? 1.2.4?
#4937
Quote from: SKYnv on November 21, 2012, 11:04:52 AM
nxagentd -h бесконечный цикл.
freebsd

UNICODE или обычный? С UNICODE похоже проблем много еще...
#4938
Распределение по подсетям делается на основе интерфейсов. Т.е. для каждого интерфейса из его IP адреса и маски получаем адрес подсети, и добавляем ноды в соответствуюший обьект подсети. При необходимости создаются новые обьекты. Потенциально возможны проблемы если адрес, который прописан как primary host name отсутствует на интерфейсах по какой-либо причине. В 1.2.3 и 1.2.4 также были исправлены несколько багов, связанных с нодами, которые появлялись прямо в корне, и дублирующимися нодами. Если 1.2.4 помесчает хосты не в те подсети, то надо детально разбиратся - мне надо знать список интерфейсов проблемной ноды и значения с закладки "Overview".
#4939
Hi!

I have implemented multiple DCIs on one chart in performance tab in upcoming 1.2.5.

Best regards,
Victor
#4940
Hi!

Try to upgrade to 1.2.4. This should be fixed - at least I fix very similar problem in one of 1.2.x versions.

Best regards,
Victor
#4941
Hi!

Can you describe this situation with more details? I'm not sure that I understand it correctly...

Best regards,
Victor
#4942
Sorry, that was my mistake. Script called via %[] didn't get event's parameters in $1, $2, etc. Instead, you should use $event variable to access event attributes. Event class described here: http://wiki.netxms.org/wiki/NXSL:Event. To access parameters, you can use $event->parameters array. So, correct code in my example would be


default: return "Unknown code " . $event->parameters[5];


Best regards,
Victor
#4943
Hi!

Currently there are no other solution then to run nxdbmgr before starting netxmsd. You can simplify it by adding -e command line argument to netxmsd - then netxmsd will call nxdbmgr on startup. I've created a feature request to address this problem more correctly: https://www.radensolutions.com/chiliproject/issues/185. I will add additional command line argument to specify peer IP address - then if database locked by peer, server will check if it's alive, and if not, will automatically remove the lock.

Best regards,
Victor
#4944
Hi!

For showing text instead of code in events and alarms, you can use script in script library and macro like %[script_name]. For example, if you have some code as parameter number 5 in trap-generated event, you can create script called CodeToText in library:


switch($5)
{
   case 1: return "CODE 1";
   case 2: return "CODE 2";
   // and so on...
   default: return "Unknown code " . $5;
}


and then use

%[CodeToText]

in event and alarm message template.

Best regards,
Victor
#4945
Feature Requests / Re: Action Groups
November 21, 2012, 09:43:05 AM
Hi!

In general I agree that action groups could be useful. Added this to bug tracker: https://www.radensolutions.com/chiliproject/issues/184. Currently you can create notification groups by creating one action for e-mail or SMS notification and giving multiple recipients separated by semicolon.

Best regards,
Victor
#4946
Yes, exactly.
#4947
Alarm severity may or may not be of same severity as originating event. When you create alarm from event in event processing policy, you have an option to set same severity as in event or any other fixed severity.

Best regards,
Victor
#4948
Hi!

One possible way to implement MTBF calculation could be following:

1. Assume that you have two events, one for downtime start and one for downtime end.
2. We will use the following custom attributes for each node:

mtbf
mtbfTotalUptime
mtbfNumFailures
mtbfTimeUp

3. On downtime end, run the following script:


SetCustomAttribute($node, "mtbfTimeUp", time());


4. On downtime start, run the following script:


uptime = time() - GetCustomAttribute($node, "mtbfTimeUp");
mtbfNumFailures = GetCustomAttribute($node, "mtbfNumFailures");
if (mtbfNumFailures == null)
   mtbfNumFailures = 0;
mtbfNumFailures++;
mtbfTotalUptime = GetCustomAttribute($node, "mtbfTotalUptime");
if (mtbfTotalUptime == null)
   mtbfTotalUptime = 0;
mtbfTotalUptime += uptime;
mtbf = mtbfTotalUptime / mtbfNumFailures;
SetCustomAttribute($node, "mtbfNumFailures", mtbfNumFailures);
SetCustomAttribute($node, "mtbfTotalUptime", mtbfTotalUptime);
SetCustomAttribute($node, "mtbf", mtbf);


After this script execution, custom attribute "mtbf" will contain MTBF in seconds.

5. If you want to see current MTBF value as DCI for the node, you can create DCI with source "Internal" and name "Dummy", and use the following transformation script:


return GetCustomAttribute($node, "mtbf");


MTTR can be calculated in similar way.

Best regards,
Victor
#4949
Hi!

There are few different ways to achieve required functionality. First is to create alarm message texts and keys based on subcomponent. Let's assume that you have mapped subcomponend identifier to parameter number 2 of your event. Then you can create alarms with key like DEVICETRAP_%i_%2 . With such key, events related to different subcomponents will create separate alarms, and events related to subcomponent with already active alarm will replace existing alarm's text, severity, etc. and update repeat count. Creating alarms of different severity is abit more tricky - you will need separate rule for each severity. Rules have to be identical except filtering script which should check severity in the trap. For example, if you have mapped severity to event's parameter number 3, and it is text string like "minor", "major", etc., you can use filtering scripts like this:


return $3 == "minor";


or simply


$3 == "minor"

(note the absence of the semicolon in last case).

Another possible way is to create single rule in event processing policy that will call NXSL script for trap-based event and stop processing, and in that script create different new event based on trap parameters (using PostEvent function).

And the hardcore way is to create server module that will process traps and do whatever needed - generate events, update object attributes, etc.

Best regards,
Victor
#4950
Hi!

I try to reproduce this issue, but everything is working on my test system. How do you run agent? Did you try to run it from command line in foreground?

Best regards,
Victor