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 - Dan

#16
Hi!

Hm ok, strange.
But it works now, so maybe it was just the good ol' user error :)

Thanks for your help though!

Best regards,
Dan
#17
Hi!

The plaza variable is created like this,


if ($node->name ~= "^(.*)ru[rf]([0-9]{2})1") {
plaza = $1;
lane = int64($2);
}


I just tried changing the creation of the variable "server_name" from,


server_name = "" . plaza . ".se";


to,


server_name = plaza . ".se";


And now the following creates a node object,


server_name_node = FindNodeObject($node, server_name);


It does work now, it seems like it was my creation of the variable "server_name" that was the problem.
So I guess it was my bad code that just didn't work :)

Thank you for the feedback!

But, now when I test the script the console application dies


NETXMS CONSOLE CRASH DUMP
Sat Jun 26 19:30:54 2010

EXCEPTION: C0000005 (Access violation) at 76EB1FFE

NetXMS Console Version: 1.0.1
OS Version: Windows NT 6.1 Build 7600
Processor architecture: Intel x86

Register information:
  eax=00000138  ebx=0012DE20  ecx=00720000  edx=0012DE20
  esi=2AA7F833  edi=0012DE18  ebp=02A9FEEC  esp=02A9FEB8
  cs=001B  ds=0023  es=0023  ss=0023  fs=003B  gs=0000  flags=00010206

Call stack:
  [ntdll:76EB1FFE]: RtlFreeHeap
  [ntdll:76EB1FAF]: RtlFreeHeap
  [MSVCRT:756598CD]: free
  [nxcon:0040B323]: (function-name not available)
  [kernel32:75AF1174]: BaseThreadInitThunk
  [ntdll:76EBB3F5]: RtlInitializeExceptionChain
  [ntdll:76EBB3C8]: RtlInitializeExceptionChain


Adding the .mdmp file.
#18
Hi!

I am using 1.0.1.

I found the following post very helpful,

Quote from: Victor Kirhenshtein on February 25, 2010, 06:40:53 PM
In 1.0.0-rc1 I have added new NXSL function FindNodeObject. It takes two arguments: current node object and ID or name of node of interest. It can be used as following:


sub main()
{
   // Search for node named "gateway"
   gw_node = FindNodeObject($node, "gateway");
   
   if (gw_node == null)
      return 0;   // No such node or access denied

   // from here, gw_node can be used in a same way as $node, for example:
   status = GetDCIValue(gw_node, FindDCIByDescription(gw_node, "Status"));

   return 1;
}



I have tried doing this with the following code,

server_name = "" . plaza . ".se"; // this gives me the server name in the var, as this is different depending on which node that the DCI is running on
server_name_node = FindNodeObject($node, server_name);
return server_name_node;

This only gives me "null" which would indicate that the server with the server_name is non-existant.
But I have also set the node name manually, instead of using the var, which works as it should, but this means a lot of manual work and a generated name in a var is much more flexible :)

So my question is, is there something I am missing, or is it just not possible to use the variable instead of a static argument?

Best regards,
Dan
#19
General Support / Re: Monitor heartbeat?
June 23, 2010, 02:43:32 PM
It was the push DCI that was my main concern, sorry for not saying so!

This will probably solve the problem perfectly :)

Thanks!

Best regards,
Dan
#20
General Support / Monitor heartbeat?
June 21, 2010, 06:03:29 PM
Hi!

I am trying to monitor if a DCI is not updated within a certain interval, like a heartbeat.
If the "monitored" DCI is not updated within a scheduled interval, then it should create the alarm.

I am thinking about using the data collection transformation for this, but I don't know if there is any built in function or any other way to check the date for the last update on a DCI?

Is this the way to go or is there a better way to create such a heartbeat monitoring?

Keep up the great work!

Best regards,
Dan
#21
Hi,

We are, at the moment, using two installations to monitor two different locations.
The largest installation contains about 1000 nodes and the smaller one about 200 - 300.

We are planning to add about 1 - 2 more locations in the near future and gather all the alams in a central server for easier management.
#22
Ah nice.
Thanks for the very fast help and answers!

Best regards,
Dan
#23
Here it is, this time when I created a few groups,

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x42807950 (LWP 29468)]
0x00007f91007b0055 in free () from /lib/libc.so.6
(gdb) bt
#0  0x00007f91007b0055 in free () from /lib/libc.so.6
#1  0x00007f91020ff143 in ~Group (this=0x186c000) at userdb_objects.cpp:561
#2  0x00007f91020fd64a in SaveUsers (hdb=0x7f90f001b510) at userdb.cpp:136
#3  0x00007f91020f897d in Syncer (arg=<value optimized out>) at syncer.cpp:116
#4  0x00007f9101e5c3ea in start_thread () from /lib/libpthread.so.0
#5  0x00007f910081acbd in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()
(gdb)


Best regards,
Dan
#24
Will do,

I have recompiled the server though and it seems like I am able to remove groups without any problem.
But I will run it in gdb and send a trace.

Best regards,
Dan
#25
Checked the eventlog and noticed the following entry when trying to remove one of the groups:

"Database query failed [Query: DELETE FROM groups WHERE id =-2147483643; Error: ERROR: relation "groups" does not exist]

Which is correct as there is no such table.

It seems like that error causes netxmsd to crash.

Located in src/server/core/userdb_objects.cpp on row 651,
_sntprintf(query, 256, _T("DELETE FROM groups WHERE id=%d"), m_id);
#26
Hi,
Im running 0.2.30 under ubuntu intrepid.
Netxms where running fine during configuration until I tried to configure new users and groups, like adding new access, removing access, adding users to groups, as well as deleting some of them.
This happens when running it both as a daemon and in the foreground,

netxmsd  -c /etc/netxms/netxmsd.conf
Using configuration file "/etc/netxms/netxmsd.conf"
Configuration file OK
[14-Oct-2009 17:06:05] Platform subagent "/usr/lib/libnsm_linux.so" successfully loaded
[14-Oct-2009 17:06:05] Database driver "/usr/local/lib/libnxddr_pgsql.so" loaded and initialized successfully
[14-Oct-2009 17:06:05] Stalled database lock removed
[14-Oct-2009 17:06:05] Listening for SNMP traps on UDP socket 0.0.0.0:162
[14-Oct-2009 17:06:05] Listening for client connections on TCP socket 0.0.0.0:4701
[14-Oct-2009 17:06:05] NetXMS Server started

NetXMS Server V0.2.30 Ready
Enter "help" for command list or "down" for server shutdown
System Console

netxmsd: Segmentation fault

When I restart netxms and connect again, the deleted and altered groups/users are still there.

I am able to add nodes and change other things without any hazard.

I am running it with PostgreSQL 8.3.8

I have attached an strace of a crash.

Anyone got an idea what could be wrong?
#27
Hi!
Ah, I thought I was losing it :)

Thanks for the answer, and a truly great work!

Best regards,
Dan
#28
Hi guys!

I'm running 0.2.26 and trying to add a new user, which is not an administrator, to only to view maps and alarms, but this user should also be able to acknowledge and also terminate alarms.

I am able to acknowledge and terminate alarms, and I can see all the current alarms in the alarm browser, but when I try to view my newly created map "overview", I can only view the "default" one.
My own map, "overview" is created with a "container" as a root object.

I've added a user, alarmoperator, under the group "Operator" which has the default properties,
- view snmp trap log
- view event database
- delete alarms

My user does not have any other system rights.

I have added the group "Operator" to have the following rights and properties on both the objects "Entire network" and "All services",
- Read
- View alarms
- Acknowledge alarms
- Terminate alarms

My containers under "all services" are set to inherit the rights from parent container.

My question is, how do I add the new map so my new user can view it?
I am able to view the map as the administrator, but not as a "regular" view only user.

Couldn't find anything regarding this in the user manual.
Hopefully someone knows what I am doing wrong!

Thanks in advance

Best regards,
Dan