News:

We really need your input in this questionnaire

Main Menu
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

Topics - Andrew

#1
General Support / Script to activate unsupported DCIs
December 12, 2017, 03:22:02 AM
My goal is the write a script that I can run from the server console that will walk through a group of nodes in a particular container and activate DCIs that are currently disabled and showing as unsupported.

My first question, is this possible?

Second, I'd like to write a script that can run even with CheckTrustedNodes set 1.  My first problem is retrieving the root object.  I know I am suppose to use:

$r = FindObject("1",$object);

but $r is always null, and my thought is that I don't have permission to access the root object.  My user is part of the admins group.  Am I missing something here?  Andrew
#2
General Support / Using custom attribute in a DCI
October 30, 2017, 08:33:34 PM
I am trying to use a custom attribute inside a DCI.  I have a data parameter ServiceCheck.Custom(%IP%,80) and a custom attribute IP = 192.168.0.1.  I am trying to poll the web port of a device from this node, but I want to specify the IP as a custom attribute.  Is this possible? and what is the correct syntax?  Thanks, Andrew
#3
General Support / Unsupported DCIs change to disabled
October 20, 2016, 07:21:17 PM
I have a situation where a DCI  becomes disabled on many nodes due to an unsupported value, because I am pushing out an updated script.  Up to this point, I have been using the management console to re-enable the DCI on each node, which resolves the issue, but is very time consuming because I have to drill down into each node.  Is there a way to have a node recover from an unsupported value on it's own (automatically re-enable the DCI), or be able to select many nodes at one time and re-enable the DCI?  Thanks, Andrew
#4
General Support / Agent not creating log file
September 08, 2016, 01:41:42 AM
Hello, I have a server running NetXMS version 2.0.5, and a client running 2.0.4 with the following config file:

##
## netxmsa.conf
##
MasterServers = 10.2.23.208,10.1.23.208,10.2.25.172,10.1.25.172
DataDirectory = C:\ProgramData\NetXMS
EnabledCiphers = 1
ExecTimeout = 300000
FileStore = C:\Users\Public\Downloads
ConfigIncludeDir = C:\ProgramData\NetXMS\netxmsa
LogFile = C:\ProgramData\NetXMS\netxmsa\var\netxmsa.log
# LogFile = {syslog}
RequireAuthentication = no
StartupDelay = 16
SubAgent = portcheck.nsm
SubAgent = winperf.nsm
SubAgent = wmi.nsm

The client agent starts, but doesn't not generate the log file C:\ProgramData\NetXMS\netxmsa\var\netxmsa.log.  The directory exists, and has the correct permissions.  Is there some other way I can get diagnostic information to find out why it is not writing out this file?  Thanks, Andrew
#5
General / Help with Java API
August 09, 2016, 12:33:31 AM
Hello, I am trying write a simple Java program to help automate some tasks, and I am having some difficulty working with the API.  I wrote this test program:

// NetXMS API Version 2.0.4

import org.netxms.client.*;
import org.netxms.base.*;
import org.netxms.client.objects.*;

public class xmstool
{
    public static void main(String[] args)
   {
      
      try
      {
         NXCSession s = new NXCSession("NetXMS server");
         s.connect();
         s.login("user", "password");
         
         if(s.isConnected())
         {
            System.out.println("Connected");
         }
         else
         {
            System.out.println("Not connected");
         }
         
         AbstractObject node = s.findObjectByName("name of node");
         
         if(node == null)
         {
            System.out.printf("Did not find node\n");
         }
                  
      } catch(Exception e)
      {
         System.out.println("Fail");
         
      }      
    }   
}

I the program runs, and connects to the server, but I am not able to get a valid node object no matter what name I search for.  Am I missing something? Andrew