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

#31
General Support / Re: SSH DCI Collection
January 12, 2022, 06:53:09 PM
@Victor - Wondering if you have had any opportunity to look into this.  We are running 3.9.420 and still having issues with this. 
#32
Excellent!  I suspected that was the case as well and appreciate you confirming this.
#33
A recent scan of our NetXMS VM shows the following:

[WARNING] /usr/lib/x86_64-linux-gnu/netxms/java/jython-standalone-2.7.2.jar contains log4j files

Curious where this is all used and what the solution might be if this is an issue.  We are running the latest version of NetXMS and also do run the web console.  Thanks!
#34
General Support / Re: SSH DCI Collection
December 14, 2021, 02:51:38 PM
Here is the Parameter we use for the DCI:

:global inPool "client";/system script run dhcpPoolMon

The script simply counts up the total number of leases available / in use in that DHCP pool and reports back with a JSON formatted response.  The script is:

:global inPool

:local ipUsed 0
:local ipTotal 0
:local nextPool $inPool
:local currPool

# Process the pool passed in and any next pools as one block
:do {
  :set currPool $nextPool
#  Each pool can have multiple ranges listed
  :foreach range in=[/ip pool get "$currPool" ranges] do={
    :local rangeString [:tostr  $range]
    :local ipStart [:toip [:pick $rangeString 0 [:find $rangeString "-"]]]
    :local ipEnd [:toip [:pick $rangeString ([:find $rangeString "-"] + 1) 31]]
    :set ipTotal ($ipTotal + $ipEnd - $ipStart + 1)
#   Read through leases and count ones in this pool
    /ip dhcp-server lease
    :foreach i in=[find] do={
      :local ipActive [:toip [get $i active-address]]
      :if (($ipActive >= $ipStart) && ($ipActive <= $ipEnd)) do={
        :set ipUsed ($ipUsed + 1)
      }
    }
  }
  :set nextPool [:tostr  [/ip pool get "$currPool" next-pool]]
} while ([:len $nextPool] > 1)

put "{total:$ipTotal, used:$ipUsed}"


That way pools can be expanded prior to being exhausted.  Thanks!
#35
General Support / Re: Node / Interface interaction
December 02, 2021, 02:14:58 PM
Victor,

Thanks for the code correction!  Seems now that we are seeing this issue:

https://www.netxms.org/forum/general-support/no-peer-in-object-details/

I looked at the switch of the device I was testing with and only 3 of the 15+ ports that have devices attached were showing a peer node.  Will wait for a release that addresses that issue and the do further testing.  Thanks!
#36
General Support / Re: Node / Interface interaction
November 29, 2021, 10:19:59 PM
I thought it would be best to only block where peer node is know, so I tried adding the following filter:

return ($object->peerNode == null);

That is causing issues and the EPP is logging errors to the alarm browser with unknown object's attribute. 
#37
General Support / Node / Interface interaction
November 24, 2021, 10:41:33 PM
Looking for some suggestions on the best way to handle a situation we currently have in our alarm monitoring.  If a device is down it will generate the Critical alarm from SYS_NODE_DOWN and that is excellent and what we want.  However, it will also generate a Minor alarm from SYS_IF_DOWN on the switch that the device is connected to.  Looking for ideas on the best way to correlate these two events so that only the Critical one is triggered or when it triggers it clears / prevents the Minor interface alarm.

Thanks!
#38
General Support / Re: SSH DCI Collection
November 24, 2021, 10:36:40 PM
Anybody?
#39
General Support / SSH DCI Collection
November 13, 2021, 12:24:52 AM
We have some scripts on Mikrotik routers that generate a JSON string output and would like to start using that in NetXMS for monitoring.  However, any combination I try to get this working seems to end with the DCI being in << ERROR >> state.  I ran the agent with debug 7 and this is what we get:

2021.11.12 16:16:01.638 *D* [comm.cs.3          ] Requesting metric "SSH.Command(10.0.xxx.xxx:22,"admin","NOTREALPW",":global inPool ""client"";/system script run dhcpPoolMon","",0)"
2021.11.12 16:16:01.638 *D* [ssh                ] AcquireSession: acquired existing session [email protected]:22/2
2021.11.12 16:16:01.657 *D* [ssh                ] SSHSession::execute: read error: Remote channel is closed.
2021.11.12 16:16:01.657 *D* [ssh                ] SSH output is empty


I did a bunch of searching and currently have an ssh agent config file which looks like:

# cat /etc/nxagentd-ssh-config
HostKeyAlgorithms +ssh-dss
KexAlgorithms +diffie-hellman-group1-sha1


As most others I can of course SSH from the command line on this server to the Mikrotik just fine, use the exact same login / command and get the desired results.  Need some assistance getting this going.  We have the server / agent at 3.9.344 and this is running on an Ubuntu 20.04.3 server.
#40
General Support / Re: Find MAC Address
October 28, 2021, 02:19:28 PM
Thanks Victor, appreciate that!
#41
General Support / Re: Find MAC Address
October 15, 2021, 12:43:34 AM
This works ofc but not with the desired result.  If we search for one of the MAC addresses on a router with multiple interfaces this returns the interface object and not the node associated with that.  There is not an easy way from the Interface to tell the node it is associated with either.
#42
General Support / Find MAC Address
September 28, 2021, 12:32:28 AM
Is there any way to pass this a partial MAC address and allow it to find all instances that match?  We typically record the last 4 of a MAC address for certain things as it provides enough uniqueness where needed.  Have tried regex and other variations, seems to want all 12 hex digits.  Just curious.
#43
Announcements / Re: NetXMS 3.9 version 3.9.235
September 07, 2021, 05:42:06 PM
Suspect you are aware, but Ubuntu repositories still have 3.9.229 as latest.
#44
Feature Requests / Node Properties from Object Details
August 25, 2021, 02:08:47 PM
May times when looking through the Alarm Browser we will right click and alarm and select the Show object details option to dig in further.  However there are times we would like to examine the nodes Properties but in order to do that we need to jump over to the Object Browser and find the node there to right click and view the Properties.  It would be nice if this were an option to pull these up right from the Overview tab of the details. 

My suggestion would be a button in the General section header over to the right, but ANYWHERE would be great.  Thanks for considering this enhancement.
#45
General Support / Re: Template autoapply rules
August 17, 2021, 08:37:04 PM
Glad to hear it is working, mark topic [SOLVED]!