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

#4531
You forgot double quotes around OID passed to aboveZero function, so script ends up with syntax error. And you can shorten the script to just


return ($node->snmpOID == ".1.3.6.1.4.1.25506.1.1") && aboveZero(".1.3.6.1.4.1.25506.2.6.1.1.1.1.6.47");


function aboveZero will be called only if first condition is true, because NXSL uses short-circuit expression evaluation (http://en.wikipedia.org/wiki/Short-circuit_evaluation).

Best regards,
Victor
#4532
I agree that this is a workaround, not a full solution. I've added a feature request for built-in DCI data aggregation - should not be that hard to implement.

There are housekeeper job that starts at fixed intervals (controlled by server configuration parameter "HouseKeepingInterval"). It deletes all data that is older then retention time configured for DCI.

Best regards,
Victor
#4533
Quote from: sperlm on June 11, 2013, 07:00:36 PM
The "null" parameter in findObjectNode was not clear to me (but it works with it too).

It's a reference to already known object. Here is the explanation: http://wiki.netxms.org/wiki/SG:Security_Issues.

Best regards,
Victor
#4534
General Support / Re: Can't unselect node in map
June 11, 2013, 06:17:55 PM
Hi!

Strange, this issue supposed to be fixed already. I'll check. Do you have any background set on map?

You can set default icon type in map object properties, on "Map Options" page. This is only related to predefined maps.

Best regards,
Victor
#4535
Node name is a string, not an object reference. If you want to find node object by name, you could use FindObject or FindNodeObject function, like this:


node = FindNodeObject(null, $1);
println "Node ID: " node->id;


Also check this script example: http://wiki.netxms.org/wiki/Script_Example:_Read_SNMP_Value_From_Node

Best regards,
Victor
#4536
Hi!

Attached is updated version of SYMBOL-WS driver. It should detect RFS6000 as supported device. I'll try to implement other changes we have discussed in 1.2.8 release (radio interfaces as separate objects and correct handling of down APs).

Best regards,
Victor
#4537
Quote from: sperlm on June 07, 2013, 01:49:48 PM
Thanks for the reply, filters work exactly as I need now.

Few clarifications:

a)
In my previous question 4) I was referring to the wiki information under Templates section "Macros in template items"
QuoteYou can use various macros in name, description, and instance fields of template DCI.
namely: script:name - String returned by script name. Script should be stored in script library (accessible via Configuration -> Script Library). Inside the script, you can access current node's properties via $node variable.

To put the question short - where exactly it can be used?
(as the wiki information does not make sense to me - DCI form has no "name", macro {instance} can be used in the Parameter on the other hand)

Macros in templates expands when template being applied to node. It is useful when you want to put some node-specific information during template apply (node IP address for example) into parameter name or description.  "name" was the old universal name for what you now see as "Parameter" for agent DCI, "OID" for SNMP DCI, etc. It is still used in some places.

Quote from: sperlm on June 07, 2013, 01:49:48 PM
b)
Performance tab - a little insight on this would be appreciated.
(did not find any on wiki or forums and this looks like it can solve my problem with viewing the collected data, namely the automated ones)

Performance tab shows line charts with last hour data for all DCIs marked to be shown on performance tab. You can enable DCI for performance tab in DCI properties, on "Performance Tab" page.

Quote from: sperlm on June 07, 2013, 01:49:48 PM
b)
If dci and node parameters are global, does it mean we can use class reference attributes like $node->snmpOID anywhere?
I am already filtering nodes for templates with this functionality so I assume it is possible.

Yes, all scripts related to nodes have $node variable set, and all scripts related to DCIs have $dci variable set.

Quote from: sperlm on June 07, 2013, 01:49:48 PM
c)
I also tried to use the same script functions from instance discovery in automatic apply rules for templates but could get results only with direct scripts, when I try to do the same thing with use/script it does nothing (or I was not able to test it properly).

There are no difference between automatic apply rule script an any other script regarding library use. Most likely you've make some mistake. Please post your scripts here.

Best regards,
Victor
#4538
Hi!

This feature seems interesting. I have added it to our issue tracker as feature request (https://www.radensolutions.com/chiliproject/issues/290). As for accessing AD from NetXMS server, on UNIX/Linux we probably can use LDAP.
Also, it is possible now to create Python script for nxshell (http://wiki.netxms.org/wiki/Using_nxshell_to_automate_bulk_operations) which will use LDAP to access AD and NetXMS API to create appropriate objects under infrastructure services tree. This will not be simple script though.

Best regards,
Victor
#4539
Hi!

You pass $1 to GetNodeInterfaces. It's a first argument of the script. It depends on context, but it's unlikely that it will be node object. If you want to work with "current" node (i.e. owner node of DCI in transformation script), you can use built-in variable $node. In other cases, you can use FindNodeObject function to obtain reference to node object you are interested in.

Best regards,
Victor
#4540
Hi!

Yes, this is the way to go - create hierarchy of DCIs with source Internal/Dummy and transformation script reading average value from previous DCI in hierarchy. For example, for System.CPU.Usage parameter transformation script to calculate 10-minutes average will look like this:


now = time();
return GetAvgDCIValue($node, FindDCIByName("System.CPU.Usage"), now - 600, now);  // 600 is number of seconds


Best regards,
Victor
#4541
С UTF-8 работать нормально не будет. Надо либо ставить CP1251, или делать UNICODE сборку. Ну и не забыть проверить, что в базе с кодировкой все в порядке.
#4542
Also, on what OS your server is running? I'll build a patched driver for you.
#4543
You right about configured and adopted lists. I think I should change the driver to read both configured and adopted radios, and change status of APs/radios if they not found in adopted list. Can you send me full SNMP walk dumps of .1.3.6.1.4.1.388.14.3.2.1.11.5 and .1.3.6.1.4.1.388.14.3.2.1.11.11? I don't have instant access to the device, so I cannot get this information for testing. Btw, when I design wireless monitoring part, I was also thinking about putting radios as interface objects below access point objects. Do you think it could be useful?

Best regards,
Victor
#4544
That's the problem, server expects correct response here. Is there any standard MIBs this device supports? Anything under .1.3.6.1.2.1.1 or .1.3.6.1.2.1.2?

Best regards,
Victor
#4545
Another possible problem could be if device does not support standard MIBs. NetXMS server tries to retrieve OIDs .1.3.6.1.2.1.1.2.0 and .1.3.6.1.2.1.1.1.0 to check if device can respond to SNMP. If device does not support system MIB for some reason then server will not be able to detect SNMP agent on it. Can you check that device responds to these OIDs?

Best regards,
Victor