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

#61
Feature Requests / Re: Mqtt broker
November 27, 2015, 11:55:48 AM
Any linux running machines, even virtual host would work as a test.

NetXMS just need to act as a MQTT broker or connect to one and listen to topics.
This could be something like the "nxpush", but ie "nxmqtt"

Ex: embeded device announce "TOPIC/%NODE%/%DCI_VALUE%" to MQTT broker, netxms puts value into correct place.

#62
General Support / Re: Server stop accepting new clients
November 06, 2015, 10:21:45 AM
Found answer to "1": possible via Server Console with "kill <session>"

But it does not end the session.


netxmsd: show sess
CLIENT SESSIONS
============================================================
ID  STATE                    CIPHER   CLTYPE  USER [CLIENT]
0   CMD_GET_OBJECTS          NONE     DESKTOP [email protected] [nxjclient/1.2.16 (Linux 3.2.54; libnxcl 1.2.16)]
1   CMD_GET_OBJECTS          AES-128  DESKTOP [email protected] [nxmc/1.2.17 (Windows Server 2012 R2 6.3; libnxcl 1.2.17)]
2   CMD_GET_OBJECTS          NONE     DESKTOP [email protected] [nxjclient/1.2.9 (Linux 3.13.0-66-generic; libnxcl 1.2.9)]
3   CMD_GET_OBJECTS          AES-128  DESKTOP [email protected] [nxmc/1.2.17 (Windows Server 2012 R2 6.3; libnxcl 1.2.17)]
4   idle                     NONE     DESKTOP [email protected] [nxjclient/1.2.16 (Linux 3.16.0-4-amd64; libnxcl 1.2.16)]
5   CMD_GET_OBJECTS          AES-128  DESKTOP [email protected] [nxmc/1.2.16 (Windows 8 6.2; libnxcl 1.2.16)]
6   idle                     AES-256  DESKTOP [email protected] [nxjclient/1.2.16 (Linux 3.2.0-4-amd64; libnxcl 1.2.16)]
7   CMD_GET_OBJECTS          AES-128  DESKTOP [email protected] [nxmc/1.2.17 (Windows 8 6.2; libnxcl 1.2.17)]
8   idle                     AES-256  DESKTOP [email protected] [nxjclient/1.2.16 (Linux 3.2.0-43-generic; libnxcl 1.2.16)]
9   idle                     AES-256  DESKTOP [email protected] [nxjclient/1.2.16 (Linux 3.16.0-4-amd64; libnxcl 1.2.16)]
10  idle                     NONE     DESKTOP [email protected] [nxjclient/1.2.16 (Linux 3.2.0-4-amd64; libnxcl 1.2.16)]
11  CMD_GET_OBJECTS          AES-128  DESKTOP [email protected] [nxjclient/1.2.9 (Linux 3.2.0-37-generic; libnxcl 1.2.9)]
12  CMD_GET_OBJECTS          AES-128  DESKTOP [email protected] [nxmc/1.2.16 (Linux 3.2.0-37-generic; libnxcl 1.2.16)]
13  CMD_GET_OBJECTS          AES-128  DESKTOP [email protected] [nxmc/1.2.16 (Windows 8 6.2; libnxcl 1.2.16)]
14  CMD_GET_OBJECTS          AES-128  DESKTOP [email protected] [nxmc/1.2.17 (Windows 8.1 6.3; libnxcl 1.2.17)]
15  CMD_GET_OBJECTS          NONE     DESKTOP [email protected] [nxjclient/1.2.9 (Linux 3.13.0-66-generic; libnxcl 1.2.9)]
16  CMD_GET_OBJECTS          NONE     DESKTOP [email protected] [nxjclient/1.2.16 (Linux 3.2.54; libnxcl 1.2.16)]
17  CMD_GET_OBJECTS          NONE     DESKTOP [email protected] [nxjclient/1.2.16 (Linux 3.2.54; libnxcl 1.2.16)]
18  CMD_GET_OBJECTS          NONE     DESKTOP [email protected] [nxjclient/1.2.9 (Linux 3.13.0-66-generic; libnxcl 1.2.9)]
19  CMD_GET_OBJECTS          AES-128  DESKTOP [email protected] [nxmc/1.2.17 (Windows 8 6.2; libnxcl 1.2.17)]
20  idle                     NONE     DESKTOP [email protected] [nxalarm/1.2.17 (Linux 3.13.0-63-generic; libnxcl 1.2.17)]
#63
General Support / Server stop accepting new clients
November 06, 2015, 09:55:05 AM
We are randomly getting problem with clients on different computers hang during login with NetXMS client.
This connection session do not timeout and we are not able to connect any new clients before server restart

1: Is it possible to boot/kick a client session with nxadm or other command?
2: Is there a limit/config for max active client sessions?
3: Would it be a problem connect nxjclient 1.2.16 to a server v1.2.17?
#64
General Support / nxshell gives Request timed out
July 29, 2015, 09:45:05 AM
I have a nxshell script that takes linux formated hosts (/etc/hosts) list and adds it as nodes.
When after running it ok 2 times i get "Request timed out" on 3th run.
Then i need to wait xx minutes before i get it to work again.

Do the script open a connection and then not closing it proper so i need to wait for some timeout?

Script:
#!/usr/bin/python
#
# 2015-07-29 - EspenGB - Working 1.2.17
# Usage:
# $0 hostname
# * Ex: $0 node.netxms.tld

# $0 hostfile(/etc/hostname)
# * Ex: $0 /etc/hosts

# $0 hostname/hostfile containerId
# * Ex: $0 /etc/hosts 1234

import sys, socket, os, string, re

if len(sys.argv) < 2:
    print >>sys.stderr, 'Usage: ' + sys.argv[0] + ' <file/host> [<containerId>]'
    sys.exit(1)
   
name = sys.argv[1]

def addNode(name):
    try:
        test = socket.inet_aton(name)
        host_ip = name
    except socket.error:
        try:
            host_ip = socket.gethostbyname(name)
        except socket.error:
            host_ip = "0.0.0.0"

    if sys.argv[2]:
containerId = int(sys.argv[2])
    else:
        if sys.argv[0] == "nxshell_test":
            containerId = int(5636)
        else:
            containerId = int(5636)
    flags = NXCObjectCreationData.CF_DISABLE_NXCP | \
            NXCObjectCreationData.CF_DISABLE_SNMP
   
    cd = NXCObjectCreationData(objects.GenericObject.OBJECT_NODE, name, containerId);
    cd.setCreationFlags(flags);
    cd.setPrimaryName(host_ip) # Create node with IP address
    nodeId = session.createObject(cd)
    print " * Added {0} to containerID: {1}".format(name, containerId)
   
def is_valid_ip(ip):
    m = re.match(r"^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$", ip)
    return bool(m) and all(map(lambda n: 0 <= int(n) <= 255, m.groups()))

if os.path.isfile(name):
    print "File found: "
    for names in open(name).readlines():
hostnames = re.split(r'\s+', names)
host_ip = hostnames[0].strip()
host_name = hostnames[1].strip()
if is_valid_ip(host_ip):
    print "Add: '" + host_ip + "' '" + host_name + "'"
            addNode(host_name.strip());
else:
    print "Add: " + name.strip()
    addNode(name.strip());
#65
General Support / Re: "Automatic Apply rules" delay
June 03, 2015, 04:12:22 PM
Using SNMP is not a solution, most DCI are custom made push/exec pull because of in-house business specific units.

I do not see any problem days after netxms have been (re)started and DCI polling have run atleast once..

What im looking for is delay on the configuration polling, prevent it from running right after start.

#66
General Support / "Automatic Apply rules" delay
June 03, 2015, 11:58:16 AM
I'm using "Automatic Apply Rules" to apply templates to nodes depending on what value some DCIs have.
When i restart netxms, Apply rule rutines starts before DCI have any last values, making it goes bananas removing and adding templates randomly untill next scheduled "Apply Rule" runs and DCIs are having data.

I tried adding this to "Automatic Apply Rules", but abort doesnt work here:

$node2 = FindObject("netxms-server.tld", $node);
if($node2 != null) {
  $uptimeCheck = GetDCIValue($node2, FindDCIByDescription($node2, "System uptime (min)"));
  if ($uptimeCheck != null && $uptimeCheck < 360) {
    // Abort if netxms server just restarted
    abort;
  }
}


Are there any other way to delay Apply Rule routines?
#67
General Support / Re: Triggerhappy "Node Down" alarm
November 19, 2014, 03:46:06 PM
This is what shows up when a node is detected down but are pingable

If you want more of the log i can mail you.

[19-Nov-2014 14:40:22.297] [DEBUG] Node 3404 "NODE-001-UNIT" queued for status poll
[19-Nov-2014 14:40:22.298] [DEBUG] Starting status poll for node NODE-001-UNIT (ID: 3404)
[19-Nov-2014 14:40:32.802] [DEBUG] StatusPoll(NODE-001-UNIT): bAllDown=true, dynFlags=0x00001001
[19-Nov-2014 14:40:32.802] [DEBUG] Node::checkNetworkPath(NODE-001-UNIT [3404]): cannot find interface object for primary IP
[19-Nov-2014 14:40:32.802] [DEBUG] Node::checkNetworkPath(NODE-001-UNIT [3404]): trace available, 0 hops, incomplete
[19-Nov-2014 14:40:32.802] [DEBUG] Node::checkNetworkPath(NODE-001-UNIT [3404]): will do second pass
[19-Nov-2014 14:40:32.802] [DEBUG] Finished status poll for node NODE-001-UNIT (ID: 3404)
[19-Nov-2014 14:40:32.803] [DEBUG] CorrelateEvent: event SYS_NODE_DOWN id 3267062 source NODE-001-UNIT [3404]
[19-Nov-2014 14:40:32.803] [DEBUG] EVENT 28 (ID:3267062 F:0x0001 S:4 TAG:"") FROM NODE-001-UNIT: RSE081: Node down
[19-Nov-2014 14:40:32.803] [DEBUG] CorrelateEvent: event SYS_IF_DOWN id 3267061 source NODE-001-UNIT [3404]
[19-Nov-2014 14:40:32.804] [DEBUG] EVENT 5 (ID:3267061 F:0x0001 S:2 TAG:"" CORRELATED) FROM NODE-001-UNIT: Interface "unknown" changed state to DOWN (IP Addr: 10.120.29.84/255.255.255.192, IfIndex: 1)
[19-Nov-2014 14:40:32.804] [DEBUG] CorrelateEvent: event SYS_NODE_CRITICAL id 3267063 source NODE-001-UNIT [3404]
[19-Nov-2014 14:40:32.804] [DEBUG] EVENT 10 (ID:3267063 F:0x0001 S:4 TAG:"") FROM NODE-001-UNIT: Node status changed to CRITICAL
#68
General Support / Re: Triggerhappy "Node Down" alarm
November 11, 2014, 03:35:27 PM
Anyone having same problem?
#69
General Support / Triggerhappy "Node Down" alarm
November 06, 2014, 10:48:39 AM
Have been running netxms 1.2.9 stable for a long time now, but feel the urge to upgrade and get new functions.

From 1.2.15 we have been running test servers, but keep getting the same problem with "Node Down" alarm even if the node is not having problem.

Production server have not this problem.
Production and test server are on same VMWare
Test server is a copy of production and then upgraded.

Removed all custom templates, only using ICMP ping and still problem both with agent and non-agent nodes.
If i decrease the amount of nodes, problem goes away.

Do other have the same problem?
What could i do to debug?
#70
General Support / Re: NXSL node down status
November 05, 2014, 04:27:25 PM
Thanks for quick reply Victor.

I see this option comes with 1.2.12, but we are still at 1.2.9.
Yet another reason to do the upgrade  ::)..
#71
General Support / NXSL node down status
November 05, 2014, 10:00:02 AM
Im using a working "hack" to use dynamic proxy via Dummy DCI with TransformationScript to run a custom bashscript that do some checks.

In the script i check if proxynode dont have any critical status (>=4) because i couldnt find a way to check if a node is down with NXSL.
This will work as long proxynode does not have any other alarms with Critical that is not "Node Down".
But if the proxynode have a Critical alarm that is not "Node Down" it will be detected as proxynode is down...

Script is:

sub main() {
  myName = $node->name;
  // Find my proxy from myName="aaa-001-pc01"
  $node->name ~= "^([a-z0-9]+\-)";
  // Turn it into "aaa-proxynode"
  myProxy = $1."proxynode";

  // Check if myProxy exists
  nodeObj = FindNodeObject(null, myProxy);
  if(nodeObj == null) {
      return "ERR: Node ".myProxy." not found.";
  }
 
  // Check if myProxy is up
  checkPROXY = GetDCIValue(nodeObj, FindDCIByDescription(nodeObj, "Status"));
  if (checkPROXY >= 4) {
      return "OK but proxy unreachable";
  }
 
  val = -1;
  agentParam = "EXEC(proxyscript.sh ".myName.")";
  val = AgentReadParameter(nodeObj, agentParam);
  if(val == null) {
      return "ERR: Param ".agentParam." could not be retreived.";
  }

  return val;
}
#72
General Support / Re: Native Agent not responding
October 12, 2014, 11:24:30 PM
Thank you!
Must have forgot to force it :p

2014-10-12 22:21:47   netxms-autopass   Normal   SYS_TEMPLATE_AUTOREMOVE   Template Generic_agent automatically removed from node NODENAME
#73
General Support / Native Agent not responding
October 02, 2014, 11:27:51 AM
We have had Native agent running on few devices that we later decided to only run ICMP ping polls for status.

In Polling options "Disable usage of NetXMS agent for polls" is checked, but we still get "Native agent not responding" even after a reboot of netxms server, upgrade and months after the change.

Do i missunderstand this option or is this a bug?
#74
Feature Requests / Re: nxalarm - commands
September 29, 2014, 11:25:43 PM
Thanks again Victor!
#75
Feature Requests / Re: nxalarm - commands
September 22, 2014, 03:03:23 PM
Is it possible to add "nxalarm msg <id> Comment"?