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

#1
I have been reading up on scripting with SSH and NETXMS and various items about NXSL without much success.

I believe what I want to do is fairly simple but I don't understand how to implement it in NetXMS.

I monitor many Unifi Edgerouters with NetXMS, some of these firewalls have VPN's to remote subnets / devices that I would like to confirm the state of the VPN as up or down.  One way to do this is to ping a device on the other end of the VPN that also has the benefit of causing traffic to keep the VPN's up.  Since the Edgerouters do not have a NetXMS agent installed I don't know how to implement a script from the device like I do with other agents.  I believe it should be just an SSH script but I don't know how to get NetXMS to fire the script and record the output.

Basically I want to be able to run an SSH script on a non agent device to ping or other functions and return information.  I would also like to do this on a schedule if possible or during polling.

Any ideas on how to implement this?
#2
Hello all, I am hoping someone can assist me with a issue that I would like to solve.  I am using NetXMS to monitor various devices and networks.  One network has an EdgeRouter Pro router / firewall that I am monitoring.  This firewall has a VPN to a remote network that I would like to alert on if the VPN is not up.  However, since it is a policy based VPN there is no interface to monitor.

The Edgerouter is basically a linux box that I can SSH into, so is there a way to run a script that I could run CLI commands via SSH to parse information to see if the tunnel is up, or possibly even force a ping / or initiate the vpn to retry?  I have not done any scripting with NetXMS so I am not familiar with where to start.

Thank you all for your assistance on this matter.




#3
Feature Requests / Agent for Raspberry Pi ( Buster )
October 15, 2019, 11:36:37 PM
It it possible to have an ARMF capable agent install for the raspberry pi 3?

I am building various systems that use raspberry pi's to interact with physical environments and would like to be able to monitor them.

I should mention I have attempted to install the deb package that was created a while back but the prerequisites of that install conflict with my modern versions.

#4
General Support / upgrade to 3.0 - from 2.2.10
September 11, 2019, 09:30:57 PM
Hello, I am attempting to upgrade my Ubuntu linux ( Ubuntu 16.04.6 LTS ) based NetXMS system from 2.2.10 to 3.0 

I have followed the upgrade instructions on the wiki, although it is out of date.

I have attempted the following...

Downloaded the new release and extracted it:
wget https://netxms.org/download/releases/3.0/netxms-3.0.2258.tar.gz

I then attempted to run the shell program:
sh ./configure --with-server --with-mysql

I get the following error:

....................

checking for sensors/sensors.h... no
checking curl/curl.h usability... no
checking curl/curl.h presence... no
checking for curl/curl.h... no
configure: error: libcurl is required. Check that it is installed or use --without-curl option


I do use the --without-curl option I get an error about SSL
.............
checking for sensors/sensors.h... no
checking libssh/libssh.h usability... no
checking libssh/libssh.h presence... no
checking for libssh/libssh.h... no
configure: error: libssh is required for SSH support. Check that it is installed or use --disable-ssh option



I do have Curl installed as well as SSH, I have confirmed this and dont' know why the install script is giving me these errors.

Please let me know if anyone has any advice...



#5
I am attempting to display the status of a DCI poll that I have created for a windows agent process object.  I would like to display a simple Green / Red Dot for good / bad status if the process is running or not. 

The closest I have gotten is to use a gauge - pie graph as only chart objects seem to display DCI values on the dashboards.  This does provide me a green dot if I customize the color and my process count is a value greater than zero.  However if it is zero it is just "blank" no value.

Is there a way to display a DCI value as a good / bad color indicator on a dashboard that I am missing?
#6
Is there anyway to run an Windows agent side script from a dashboard?  I would like to have the capacity to run scripts from a dashboard to do various functions on our servers so that I don't have to remote into them just to do a simple task.

the only method I have seen to launch an agent side script is via an event processing policy, but I don't see any way an event can be called from a dashboard to be enacted.

Thank you.
#7
Hello all, I wanted to share how I have been fixing my DCI collection errors.  First, I am using a CentOS based linux server as a NetXMS host, so your commands may be a little different for your OS.

NETXMS DCI Database repair steps:

If DCI errors are reported in Graph Elements perform the following steps from the command line of the NetXMS linux server:

service netxmsd stop
mysqlcheck --auto-repair netxms -u root –p
nxdbmgr check
service netxmsd start



Graph Elements should now populate after a few polls.
#8
General Support / DCI Database errors
September 21, 2015, 07:36:42 PM
I have a node with a DCI issue.

I am getting the error:

'Read DCI data from server' has encountered a problem.  Cannot get data for DCI "Node Name":[1464]: database failure

I noticed this as the data from the node was displaying on a dashboard and now just shows "Cannot get DCI Value..."

I have run a database check and all passed, I have deleted and recreated the DCI collection items with no success.

Please let me know what I can do to troubleshoot this.

Thank you.

#9
I have emails setup to email a user upon all critical alerts and resolution of given alerts.  Is there is method to email an additional user only for nodes within a container? 

Thank you for your assistance!
#10
Feature Requests / Client Web Access Window
July 06, 2015, 05:02:50 PM
Is it possible to alter the primary view within the Web Admin for users with only read permissions to a given container subset to not have the top tool bar and all the associated configuration options.  With read permissions they can't really do anything but it woudl be nice if it wasn't there.

This is for roll out of a Client View for our monitored devices.  I would like to make it as simple and clean for them as  possible.

Also, containers on Dashboards would be nice.

Thank you, and great software!!
#11
Can someone give me an example of a transform script that pulls a value from a DCI table into a variable?
#12
I have upgraded my CentOS system running  V2.0-M4 to  V2.0-M5.

I installed the new web interface .war file and restarted my tomcat service.

However now when I attempt to access the web interface I get a HTTP error 403 page as shown here:
-------------------------------------
HTTP Status 403 -

type Status report

message

description Access to the specified resource has been forbidden.
Apache Tomcat/7.0.62
---------------------------------------

Is this a bug, or did I do something wrong?
#13
General Support / SNMP free memory transform script
July 01, 2015, 07:15:08 PM
I have been working on a SNMP Free memory % transform script and I have found few examples that I can't get to work and I am not sure what I am doing wrong.

I have created a DCI parameter for total memory for the device, and another DCI for the free % transform as shown here.
memTotalReal, OID parameter - .1.3.6.1.4.1.2021.4.5.0
Memory Free %, OID parameter - .1.3.6.1.4.1.2021.4.6.0


I get the correct value for the Total Memory DCI, and on the second DCI for free % I apply this transform script:

sub main()
{
   total = GetDCIValue($node, FindDCIByName($node, "memTotalReal"));
   
   return $1 / total * 100;
}

However, I only get the value of the DCI SNMP poll as if I didn't do any tranform.  So it does not seem to be returning the correct value.

Can anyone tell me what I am doing wrong?

netxms 2.0M4


#14
General Support / Status polling and alerting
June 26, 2015, 08:42:28 PM
I am having issues with nodes not showing the proper status.  I have about 100 nodes being monitored on this system.

The server is Version 2.0-M4, on CentOS.

If I disconnect network to some of my nodes their status never changes, however if I disconnect it from other nodes the status changes in about 1-2 minutes and is recovered back to normal in 1-2 minutes upon being reconnected.

It also affects whole subnets, when I disconnect a router interface and have multiple nodes on a monitored subnet not all nodes will show down.  But some will.

I can not seem to find any reason as to why it affects some nodes and not others.  I am monitoring both Windows systems with agents, and network equipment with SNMP but no correlation seems to be apparent.

my "show queues" at the console all show "0" zeros.

Can someone help me with instructions as to how to troubleshoot this?
#15
General Support / Changing Template - reapply
June 25, 2015, 07:03:20 PM
I am starting to use templates in my install to make mass changes easier.  I have a template for windows systems to apply various data collection parameters.  I have applied the template to various systems across several containers.  I have made changes to the template but have noticed that these changes are not applied to the nodes automatically without manually re-applying the template.

I see that the template configuration has a "Automatic Apply Rules", so I entered the following script:

sub main() {
   return $node->isAgent;
}

I am not seeing the changed template "automaticly" applied to the existing nodes.  Am I missing something?

Also I would really like to only apply this to "Windows" agents not all agents but I am not familiar with how to script this.

Please help if you can, and thank you.


#16
General Support / Web Timeout on Linux server
June 23, 2015, 07:31:23 PM
Can someone help me with the file locations for a couple of files on a linux based NetXMS server?

I need to create a "nxmc.properties" file to extend the web timeout, but I dont' know where to put it.  I have this working on a Windows 7 box, but that doesn't help me with a linux file location.

Also, I would like to upload my logo and I need to know where to put that file, but of course it can be defined in the nxmc.properties file...
#17
General Support / Move container to new server
June 19, 2015, 11:52:58 PM
Is there a fast way to move or export a "Container" from the Infrastructure Services tree on one server to a new server?
#18
Here is my steps to install NetXMS 2 beta on a installation of CentOS 6.4 ( 64 bit )

I hope this helps anyone out there that is having a hard time. I attached the steps and put them inline here - they may be easier to read in the attachment:




Intall NetXMS on CentOS 6.4 with web frontend
These install instructions go through the steps of installing the NetXMS 2 beta with web frontend.
Install CentOS 6.4 minimal
Set IP and IP info
Yum install sshd
Chkconfig iptables off
Service iptables stop
Connect with SSH:
Install updates and prerequisites:
Yum update
yum groupinstall 'Development Tools'
yum install wget
yum install mysql
yum install mysql-server
yum install openssl-devel
yum install mysql-devel
Install NETXMS:
wget https://www.netxms.org/download/netxms-2.0-M4.tar.gz
tar zxvf netxms*
cd netxms*
sh ./configure --with-server --with-mysql --with-agent
make
make install
Copy sample config files:
   cp contrib/netxmsd.conf-dist /etc/netxmsd.conf
   cp contrib/nxagentd.conf-dist /etc/nxagentd.conf
Configure MySQL:
Chkconfig mysqld on
Mysql – u root –p password
CREATE USER 'netxms'@'localhost' IDENTIFIED BY 'password';
CREATE DATABASE netxms;
GRANT ALL ON netxms.* TO netxms IDENTIFIED BY 'password';
\q
Edit Netxmsd config file:
nano /etc/netxmsd.conf
DBDriver = /usr/local/lib/libnxddr_mysql.so
DBServer = localhost
DBName = netxms
DBLogin = netxms
DBPassword = password
LogFile = /var/log/netxmsd
LogFailedSQLQueries = yes
Edit NXAgentd config file
nano /etc/nxagentd.conf
   MasterServers = 127.0.0.1, your_server_IP_address
Nano /etc/ld.so.conf
   ADD LINE:   include /usr/local/lib
Ldconfig
Create NetXMS database:
/usr/local/bin/nxdbmgr init /usr/local/share/netxms/sql/dbinit_mysql.sql
Cause NEtXMS to Start NetXMS daemon on Boot:
cp contrib/startup/redhat/netxmsd /etc/init.d
chmod +x /etc/init.d/netxmsd
cp contrib/startup/redhat/nxagentd /etc/init.d
chmod +x /etc/init.d/nxagentd
chkconfig --add nxagentd
chkconfig --add netxmsd
Start services:
service netxmsd start
service nxagentd start
Install Java 8 – 64 bit
cd /opt/
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-x64.tar.gz"
tar xzf jdk-8u45-linux-x64.tar.gz
cd jdk*
alternatives --install /usr/bin/java java /opt/jdk1.8.0_45/bin/java 2
alternatives --config java
   There are 3 programs which provide 'java'.

  Selection    Command
-----------------------------------------------
*  1           /opt/jdk1.7.0_71/bin/java
+ 2           /opt/jdk1.8.0_25/bin/java
   3           /opt/jdk1.8.0_45/bin/java

Enter to keep the current selection
  • , or type selection number: 3
    Install Tomcat7
    https://archive.apache.org/dist/tomcat/tomcat-7/v7.0.62/bin/apache-tomcat-7.0.62.tar.gz
    tar xzf apache-tomcat-7.0.62.tar.gz
    mv apache-tomcat-7.0.62 /usr/local/tomcat7
    Create tomcat startup script in /etc/init.d
       #!/bin/bash
    # description: Tomcat Start Stop Restart
    # processname: tomcat
    # chkconfig: 234 20 80
    JAVA_HOME=/opt/jdk1.8.0_45
    export JAVA_HOME
    PATH=$JAVA_HOME/bin:$PATH
    export PATH
    CATALINA_HOME=/usr/local/tomcat7


    case $1 in
    start)
    sh $CATALINA_HOME/bin/startup.sh
    ;;
    stop)
    sh $CATALINA_HOME/bin/shutdown.sh
    ;;
    restart)
    sh $CATALINA_HOME/bin/shutdown.sh
    sh $CATALINA_HOME/bin/startup.sh
    ;;
    esac
    exit 0
    Make script execuitable:  chmod 755 tomcat
    Chkconfig –add tomcat
    Install NetXMS Web Frontend:
    wget https://www.netxms.org/download/webui/nxmc-2.0-M4.war
    cp nxmc-2.0-M4.war nxmc.war
    cp nxmc.war /usr/local/tomcat7/webapps
    service tomcat start









#19
I have installed the 2.0 beta on a fresh install of CentOS 6.4, 64bit.  I have NetXMS installed and working with the management console, however I am having issues with the website.

I have copied the Web "WAR" file with this command to the appropriate tomcat directory:
cp nxmc-2.0-M4.war /var/lib/tomcat6/webapps

The website then propagates as expected to the "nxmc-2.0-M4" directory



However when I try to access the website at http://server ip address/nxmc-2.0-M4/nxmc

( just in case your wondering... no http://server ip address/nxmc does not work either... :)

I am getting the following error when attempting to access the website:

HTTP Status 404 - ProxyServlet: /nxmc-2.0-M4/nxmc

type Status report

message ProxyServlet: /nxmc-2.0-M4/nxmc

description The requested resource (ProxyServlet: /nxmc-2.0-M4/nxmc) is not available.

Apache Tomcat/6.0.24


-------------------


Any ideas?

Also, Victor, great software!  If there is anything I can do to help let me know.

Thank you.