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

#151
General Support / Re: Run traceroute
June 04, 2016, 08:31:03 PM
Sure, feel free to add me on Skype at t.kirnak[at]atris[dot]sk.
#152
General Support / Re: Run traceroute
June 04, 2016, 06:36:58 PM
You can create an action that will execute a command on the server.
That command should perform a traceroute and write/append the results to a file.

Then create an EPP for the node and event you want, and as action, do that command.
(or add the action to any other already existing EPP rules)
#153
General Support / Re: Create Template from Node
June 04, 2016, 11:34:48 AM
Simply right click the DCI and do "Convert to template item".
#154
If the name of custom attribute is "Farm", then you need to use "%{Farm}".
I believe its case sensitive.
#155
I have a feeling that RouterOS will respond on those OIDs using a Bridge interface, but not using master-slave switching on CRSs.
#156
Why not use custom attributes for this?

https://wiki.netxms.org/wiki/NXSL_Function_Reference
SetCustomAttribute(...) and GetCustomAttribute(...) functions can be used.
#157
General Support / Re: Import list of servers
May 28, 2016, 02:12:01 AM
Here is a functional NetXMS .csv importer:
https://github.com/tomaskir/NetXMS-csv-importer

It will take any address for a node (ipv4, ipv6 or a hostname), but will not add multiple addresses to a single node.
The reason for this is that NetXMS uses one primary address to communicate with the node, and then discovers all of the node's IP addresses over an Agent (be that NetXMS or SNMP Agent).

Adding multiple IP addresses to a dynamic interface in NetXMS is not possible manually.
I dont want to create multiple interfaces to assign multiple addresses to a node, because you would have to delete them manually later on.

The right solution to having all information (which includes all IP addresses) of a node is to have an Agent.
So lets not code work-arounds, and focus on solving it properly, by having an Agent present on the server node :)
#158
General Support / Re: UseInterfaceAliases
May 27, 2016, 06:12:13 PM
That looks good.

As bonus info, you don't have to declare the main() function.
See this: https://wiki.netxms.org/wiki/UM:NetXMS_Scripting_Language_(NXSL)#Script_entry_point
#159
General Support / Re: Import list of servers
May 27, 2016, 06:06:44 PM
You will have to do this using a NXShell script, or using the API (I recommend the Java API, its really easy to work with).

Actually, if you want to, you can provide me with a sample csv file of you nodes, and I can write the Java importer into NetXMS for you.
(its that easy, about 200 lines of Java code)

Example csv:

Node name, IPv4 address, IPv6 address, Container to bind to
Example server 1, 1.1.1.1, 1::1, Servers
Example server 2, 2.2.2.2, , Other container
#160
Announcements / Re: NetXMS 2.0.3 released
May 24, 2016, 01:27:50 AM
Quote from: millerpaint on May 24, 2016, 01:25:19 AM
Hi,

Are we able to upgrade from Version 1.2.17 (running on CentOS) directly to version 2.0.3, using the standard upgrade process?


-Kevin C.
Yes, you can upgrade directly.
#161
You can do that also already:
https://wiki.netxms.org/wiki/NXSL:GetDCIValues
#162
You dont even need to use scripts for this, simply use Delta calculation, which is already fully available in NetXMS.
#163
Your auto-bind script will be

searchProcess = "w3wp.exe";
procArray = AgentReadList($node, "System.ProcessList");

if (procArray == null)
  return false;

foreach (process : procArray) {
  if (index(process, searchProcess) != 0)
    return true;
}

return false;


On the DCI, the parameter will be:

ServiceCheck.Custom(%{node_primary_ip},80)


Make sure to set "Source node" in the DCI configuration to the NetXMS server.

The template will be bound to the node running the IIS server, not to the NetXMS server.
(since the NetXMS server is not the one offering the HTTP service, the DCI should not be on the NetXMS server)

The service check will be performed from the NetXMS server to the IIS node tho.
(that is what the "Source node" setting configures)
#164
Your above code will apply this template to a node that has the "w3wp.exe" process running AND is the NetXMS server itself.

Is this really what you want to do?
#165
Template auto-bind script it evaluated against each node during that node's configuration poll.
So "return true;" will bind it to that node.

If you want to bind only to the NetXMS server itself, use

return $node->isLocalMgmt;