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

Messages - zsing82

#1
I have Netxms 3.8 installed on Debian 10.  On a separate machine, I have MariaDB 10.5 installed on Debian 10. (I used DEBs from MariaDB repo)  I'd like to force TLS between NetXMS Server & MariaDB Server.  I have MariaDB setup with SSL enabled:
MariaDB [(none)]> show global variables like '%ssl%';
+---------------------+--------------------------------+
| Variable_name       | Value                          |
+---------------------+--------------------------------+
| have_openssl        | YES                            |
| have_ssl            | YES                            |
| ssl_ca              | /etc/mysql/ssl/ca.pem          |
| ssl_capath          |                                |
| ssl_cert            | /etc/mysql/ssl/server-cert.pem |
| ssl_cipher          |                                |
| ssl_crl             |                                |
| ssl_crlpath         |                                |
| ssl_key             | /etc/mysql/ssl/server-key.pem  |
| version_ssl_library | OpenSSL 1.1.1d  10 Sep 2019    |
+---------------------+--------------------------------+

and created the database and user:
MariaDB [(none)]> show grants for [email protected];
+---------------------------------------------------------------------+
| Grants for [email protected]                                   |
+---------------------------------------------------------------------+
| GRANT USAGE ON *.* TO `netxms`@`netxms.mgmt.lan` REQUIRE X509       |
| GRANT ALL PRIVILEGES ON `db_netxms`.* TO `netxms`@`netxms.mgmt.lan` |
+---------------------------------------------------------------------+

Here is my NetXMS configuration:
## Logging
# Log file name
LogFile=/var/log/netxmsd

# Increase logging verbosity, 0 (only errors) to 9 (verbose debug)
DebugLevel=0

## Database configuration.
DBDriver=mariadb.ddr
DBServer=mariadb.mgmt.lan
DBName=db_netxms
DBLogin=netxms
DBPassword=

But I can't seem to get a connection working.  NXDBMGR INIT tells me Access denied, probably because it's not presenting the X509 cert & key to MariaDB. Where do I drop my user cert & key in NetXMS, and how do I configure mariadb driver to use X509?
#2
This is slightly off topic, so I can create new post if you like.  Is there a way to change the DCI status to Disabled during Instance Discovery?  I've tried the following in a Template DCI instance discovery, but it doesn't work:
snmp = CreateSNMPTransport($node);
if (snmp == null)
$dci->status = 1;
oid = ".1.3.6.1.2.1.2.2.1.8." . $1;
ifOper = SNMPGetValue(snmp, oid);
if ( ifOper != 1 )
$dci->status = 1; }
return %(true, $1, $2);

This is supposed to check ifOper status and disable the DCI of the status is not UP.
#3
Thanks Victor.  That seems to work.  The transformation script in the Node DCI is the same as in the Template DCI.  How does $dci->instance work exactly?  Is there documentation of this feature anywhere?

Again, thanks for your help!!
#4
Is there a way to insert the {instance-name} into a transformation script?  I have a Dummy DCI, "Total traffic on {instance-name} (bits/sec)" that sums 2 other DCIs and returns sum.  I'd like to apply this DCI via templates.

Template DCI transformation script:
In = GetDCIValue($node, FindDCIByDescription($node, "Inbound traffic on " . {instance-name} . " (bits/sec)"));
Out = GetDCIValue($node, FindDCIByDescription($node, "Outbound traffic on " . {instance-name} . " (bits/sec)"));
if ( In == null && Out == null )
return 0;
if ( In == null && Out != null )
return Out;
if ( In != null && Out == null )
return In;
return In + Out;


Template DCI Instance Discovery:
SNMP Walk - OIDs
Base SNMP OID:  .1.3.6.1.2.1.31.1.1.1.1
Filter script:return %(true, $1, $2);

I've tried replacing {instance-name} with $2 but no luck.  Any help is appreciated.
#5
This worked for me:
return $node->sysDescription like "HP*Switch*";

You can replace sysDescription with other node attributes:
https://wiki.netxms.org/wiki/NXSL:Node

It's an indirect SNMP call, but I thought it might help.
#6
General Support / Re: CPU instance discovery
January 22, 2017, 09:05:45 PM
Create the script in the Script Library.

Open the DCI in the template and go to Instance Discovery.
Instance discovery method = Script
Next line = name of script in Script Library
Instance discovery filter script should be left blank.  Your script will be called from the Script Library as long you entered the script name in the line above.

Force an instance discovery poll to see if it works.
#7
General Support / Re: Templates & Instance Discovery
March 18, 2014, 05:58:23 PM
Thank you very much for your help!  That worked perfectly.  I never would've figured out that script
#8
General Support / Re: Templates & Instance Discovery
March 17, 2014, 06:42:53 AM
OK, one of the things I'm trying to do is collect bandwidth consumption from Windows hosts and servers running NetXMS Agent.

Here's what I have:
A template named "Agents" with Automatic Apply script as
return $node->isAgent;

Template "Agents" contain multiple DCIs.  I have 2 specific DCIs:
Number of input bytes on interface {instance}
Number of output bytes on interface {instance}


with source being "NetXMS Agent"; data type "UnsignedInt64"; and parameters as follows:
Net.Interface.BytesIn64({instance})
Net.Interface.BytesOut64({instance})


The "Instance Discovery" page is where I think I'm getting something wrong.  For both DCIs, I have "Agent List" as discovery method and List Name is "Net.InterfaceList".  This list returns the ifIndex, IP Address, ifType, MAC Address, and ifDesc.
I'd like to transform the list results so that only ifIndex is returned to {instance}, but I have no idea how to do that.  Is this even possible using Templates?

P.S.  I'd also like to perform similar action with FileSystem.FreeSpace%, etc...
#9
General Support / Templates & Instance Discovery
March 16, 2014, 04:53:45 AM
Is it possible to use Instance Discovery within a DCI configured to a Template?  I've tried to configure this according to youTube videos and instructions on the Wiki, but it seems the DCIs never get created on the actual node after applying Template when using Instance Discovery.

I'm running 1.2.12 on Windows 2008 with SQL 2008.  Any help would be appreciated.
#10
General Support / Re: Need help troubleshooting
November 01, 2012, 04:01:00 PM
OK, maybe I should clarify a little bit.  The IP address that is bound to the X0 (LAN) port on my TZ210 does not change.  It is always 192.168.1.99.  It is only within NetXMS that shows the primary IP address as something from the Static IP pool for SSLVPN clients.  The actual IP address on the device never changes.  I can always pull up a web browser and administer the TZ210.  But, within NetXMS, after the node's Primary IP address is changed from 192.168.1.99 to an IP from the static pool, NetXMS shows the node as "DOWN" and none of the DCI's work, presumably because NetXMS is trying to communicate via an IP address from within the static pool, and not the IP that is bound to the X0 port.

What is the mechanism used to determine a nodes Primary IP Address?  Also, what polling occurs at regular intervals?
#11
General Support / How to create VPN Connector object
October 25, 2012, 04:02:38 PM
I vaguely remember creating a VPN Connector in the older versions of NetXMS, but I cannot find it anywhere in version 1.2.3  Can someone point me in the right direction?  I have a VPN router running IPSec VPN site-to-site tunnels connecting a branch office and the owner's home network.  I have all those nodes in NetXMS, but cannot figure out how to create the VPN connectors.  Any help is appreciated.  Thanks!
#12
General Support / Re: Need help troubleshooting
October 25, 2012, 03:44:46 PM
Alex, Victor,

Any ideas why the Primary IP Address of my SonicWall TZ210 gets changed from the LAN IP to an IP address from the VPN static pool?  I can provide SNMP-walks if need be.  I just don't know where to start or what to look for.  Any help would be appreciated.  Thanks again!!
#13
General Support / Re: Need help troubleshooting
October 21, 2012, 11:57:50 PM
Well, no such luck.  I disabled all my VPN and SSLVPN policies and the primary IP address continues to change to an IP address from the SSLVPN IP pool.  Other suggestions welcome.
#14
General Support / Re: Need help troubleshooting
October 17, 2012, 03:46:00 AM
Disabling network discovery polling had no effect.  The primary IP address of the SonicWall changed after a few minutes.

millerpaint,
I haven't tried that approach yet.  I will have to schedule downtime or try it late night this weekend.  Thanks for the idea.  I will post back.
#15
General Support / Re: Need help troubleshooting
October 16, 2012, 04:41:43 PM
Still trying to figure this one out.  The arp cache on NetXMS server maps the correct MAC address to the SonicWall's IP address on my LAN.  I've tried disabling status polling, configuration polling, routing table polling, and topology polling, each one at a time.  For some reason, the IP address still gets changed at random.  After disabling the various polls, the only one left is Network Discovery polling.  I just manually set the IP address and ran a configuration poll.  All the interfaces are back and DCIs are collecting data.  I'm going to disable network discovery polling for this node only and see if the IP address still changes at random.  I will post my results back.

Again, any help would be appreciated.  Thanks!