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

#5671
General Support / Re: Alarms
December 25, 2011, 05:33:35 PM
You should not have function main() in library script. Try to change it like this:


sub CISCO_Config_Event_Config(e)
{
    switch(e)
    {
    case 3: return "running";
    case 4: return "startup";
    }
}


It is strange that server crashes. I'll try to reproduce it myself.

Best regards,
Victor
#5672
General Support / Re: Alarms
December 25, 2011, 01:42:24 PM
Parameters can be passed to subroutines like that:


sub main()
{
   f(1, 2);
   f(3, 4);
}

sub f(p1, p2)
{
   println "parameter 1 is " . p1;
   println "parameter 2 is " . p2;
}


If you have multiple parameters which needs to be converted using same function, you can create separate script in the library containing this function, and call it from different small scripts. For example, create script called "convert" with function "convert":


convert(p)
{
   // do conversion here
   return converted_value;
}


then create scripts like that for each parameter:

convert_p1:


use convert;
return convert($event->parameters[1]);


convert_p2:


use convert;
return convert($event->parameters[2]);


and so on.

Best regards,
Victor
#5673
General Support / Re: Alarms
December 25, 2011, 01:25:17 PM
Hi!

Currently it is not possible - server always calls main() subroutine when expanding %[] macro. I can add an option to specify parameters and/or entry points to these scripts - in 1.1.8 or 1.1.9, depending on how fast I will fix other things from to-do list.

Best regards,
Victor
#5674
General Support / Re: cannot install netxms webserver
December 25, 2011, 01:19:51 PM
Sorry, I forgot to mention it - in 1.1.x correct configure option is --with-webui instead of --with-nxhttpd.

Best regards,
Victor
#5675
General Support / Re: Alarms
December 22, 2011, 07:24:33 PM
If I understand you need correctly, you need script which will convert numeric codes into strings, right? Then you can do the following:

Create script in script library, with some name, let's say "convert" (here I assume that you need to convert event's parameter %2 into text - otherwise change index in parameters[] accordingly):


switch($event->parameters[2])
{
   case 1: return "test";
   case 2: return "test2";
   // and so on...
}
return "unknown"; // default value


and then use it in a message like %[convert]

Best regards,
Victor
#5676
General Support / Re: Export: cannot load schema file
December 22, 2011, 11:50:41 AM
Hi!

It's a bug. Unfortunately there are no workaround, you have to wait for version 1.1.8 with a fix.

Best regards,
Victor
#5677
General / Re: About the discover poll
December 22, 2011, 11:47:56 AM
Yes, that's correct.

Best regards,
Victor
#5678
It's fixed already in the trunk, so 1.1.8 will not have this bug.

Best regards,
Victor
#5679
Try to use netstat -atnp command - then you will see what exact process keeps this port open.

Best regards,
Victor
#5680
General Support / Re: cannot install netxms webserver
December 21, 2011, 12:13:09 PM
It should be under /usr/local/bin if you have used default prefix.

Best regards,
Victor
#5681
What operating system is on remote machine?

Best regards,
Victor
#5682
Feature Requests / Re: Properties on containers?
December 21, 2011, 10:34:40 AM
I agree that this may be useful. One problem is conflict resolution - node can be placed in multiple containers - what settings should be taken in tah situation?

Best regards,
Victor
#5683
Feature Requests / Re: Select polling IP address per DCI
December 21, 2011, 10:33:09 AM
Yes, I want to create new object type "management board" for this type of situations. I'm also have a lot of servers with iLO boards :)
Currently you can use the following method as a workaround:

1. Create separate node object for management board
2. Add server node object to "trusted nodes" list of management board node object
3. Create DCI on server node object and specify management board node object as "proxy node"

Then you will have DCIs on server node object, but they will be collected from management board.

Best regards,
Victor
#5684
Feature Requests / Re: Maintenance Mode
December 21, 2011, 10:30:28 AM
Hi!

You can use unmanage/manage as a workaround for manual maintenance mode. System do nothing with unmanaged node. The only drawback is that unmanage operation is hierarchical, i.e. all interfaces and services of a node will change status as well, and when you do "manage" node again, they all come into "managed" state, even if some of them was unmanaged before.

Best regards,
Victor
#5685
Looks like database was not initialized correctly. Try to initialize it by running

nxdbmgr init /usr/local/share/netxms/sql/dbinit_<your_sql_engine>.sql

Best regards,
Victor