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

#1
General Support / Undocumented operators?
January 27, 2018, 01:15:30 AM
Good evening,

I have noticed these two operators which aren't in the documentation and would like some clarification on their use.

One of them is a single dot.  Based on usage, it appears to be used to concatenate strings?  From the Wiki page Script Example: Read SNMP Value From Node:

value = SNMPGetValue(transport, ".1.3.6.1.2.1.1.1.0");
if (value == null)
{
    println "Failed to issue SNMP GET request";
    return 2;
}
else
{
    println "System description: " . value; // This dot
    return 0;
}


The other one is this which I've seen in a number of places, including the built-in scripts: ->  Example from Filter::AgentOrSNMP:

return $1->isAgent || $1->isSNMP;

I can see that it's referencing the capabilities of the node, but when I try to do this, the script fails, and NetXMS logs an event with description "error 15 in line 5: uknown object's attribute."  On this one, I'm trying to filter out some printers and a few other devices with SNMP that I don't want it to discover.  What I was going for on the line causing the error is return true for a device that has SNMP, and also is either running spanning-tree or is a router.  Maybe there's a better way to do this.  It's my first attempt.

As best I can figure, $1->isSNMP returns true if the discovered node $1 has that capability, but I couldn't find this -> operator in the documentation.

// Select any device running the NetXMS agent,
// or any node with SNMP that matches criteria.

if ($1->isAgent) {exit 1;}
if ($1->isSNMP && ($1->isSTP || $1->isRouter)) {exit 1;}
exit 0;


Thanks

#2
General Support / Can't get management consoles to work
January 25, 2018, 05:21:13 PM
I'm new to NetXMS (coming from Opsview and Zabbix) so please excuse me if I've made a rookie mistake.  A little background... I'm trying to run NetXMS 2.2.2 on Turnkey Core 14.2 (Debian Jessie).  I have installed tomcat7, tomcat7-admin, default-jre (openjdk-7-jre), postgresql (postgresql-9.4), netxms-server, netxms-dbdrv-pgsql.  I have set everything up according to NetXMS Administrator Guide, and as far as I can tell, the NetXMS server is up and running.  However, I can't get the Windows or web management consoles to work.

My preference is to use the web console, so I tried that first.  I renamed nxmc-2.2.2.war to nxmc.war and put it in /var/lib/tomcat7/webapps.  It seems to deploy, but I get a 404 error when I try to open ipaddress:8080/nxmc.  Error attached below.  I have also tried deploying it with the tomcat web manager and had the same result.  The tomcat web manager says nxmc is deployed and running.  I am using Firefox Quantum for this.  I also tried it in Edge, but all it says is "Hmmm...can't reach this page."  Very helpful...

On this release, I can alternatively install openjdk-8-jre, postgresql-9.6, and tomcat8.  I tried that briefly but still seemed to have the same problem.  I did also try this briefly on Ubuntu Server LTS 16.04.3 but again had the same problem with the web console.

Now, I have also tried the Windows x64 management console on Windows 10.  I extracted the nxmc folder to Program Files and ran nxmc.exe.  It churns for a couple seconds and then gives me the below error.  Not sure where to go with that either.

Any help is much appreciated...