@Victor - Wondering if you have had any opportunity to look into this. We are running 3.9.420 and still having issues with this.
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[WARNING] /usr/lib/x86_64-linux-gnu/netxms/java/jython-standalone-2.7.2.jar contains log4j files
:global inPool "client";/system script run dhcpPoolMon
: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}"
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
# cat /etc/nxagentd-ssh-config
HostKeyAlgorithms +ssh-dss
KexAlgorithms +diffie-hellman-group1-sha1