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

#31
It's working great!
Thank a lot.

I have other problems when creating maps...

Seed = s.findObjectByName("NameOfMySeed")
SeedId = Seed.getObjectId()

NetworkMaps = s.findObjectByName("Network Maps")
NetworkMapsId = NetworkMaps.getObjectId()

SnmpLocationKO = s.findObjectByName("Snmp Location KO")
SnmpLocationKOId = SnmpLocationKO.getObjectId()


I have this error:
Traceback (most recent call last):
  File "/data/infra/scripts/NetXMS/Creation-de-map_ALL.py", line 27, in <module>
    SnmpLocationKOId = SnmpLocationKO.getObjectId()
AttributeError: 'NoneType' object has no attribute 'getObjectId'


Can you help me again?

Thank you
BB
#32
Hello,

I updated my netxms and nxshell version (2.2.15 => 3.1)

An attribute creation script doesn't work anymore.
Can you help it?

import csv, sys
from java.util import HashMap
...
...
        MAT = s.findObjectByName(MATname)
        if MAT :
            MATId = MAT.getObjectId()
            md = NXCObjectModificationData(MATId)
            MODIF = HashMap()
            MODIF.put("UR1location", Location)
            md.setCustomAttributes(MODIF)
            session.modifyObject(md)   
            w.writerow([
                MAT.getObjectId(),
                MAT.getObjectName(),
                MAT.getCustomAttributes(),
                ])


I'm getting the next error:

Traceback (most recent call last):
  File "/data/infra/scripts/NetXMS/Custom-Attributes_UR1location.py", line 27, in <module>
    session.modifyObject(md)
at org.netxms.client.NXCSession.modifyObject(NXCSession.java:5152)
at org.netxms.client.NXCSession.modifyObject(NXCSession.java:5691)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
java.lang.ClassCastException: java.lang.ClassCastException: java.lang.String cannot be cast to org.netxms.client.objects.configs.CustomAttribute



Thank's
#33
Ok, it works.... But it doesn't seem very normal to me.

When will a centos repository !?

Anyway, thanks for the help !
#34
By copying the 2.2.4 library into 2.2.5, the "make" works.
cp /usr/local/lib/libnxsrv.so.2.0.0 ./netxms-2.2.5/src/server/libnxsrv/.libs/libnxsrv.so.2.0.0

But it's probably not a good idea, because this library with the same version number, is bigger:
rwxr-xr-x 1 root root 728664 May 16 11:02 /root/NetXMS/netxms-2.2.5/src/server/libnxsrv/.libs/libnxsrv.so.2.0.0
rwxr-xr-x 1 root root 766072 May 16 10:54 /root/NetXMS/netxms-2.2.5/src/server/libnxsrv/.libs/libnxsrv.so.2.0.0.ori

The library has changed and no longer contains the variable SNMP_Variable::getValueAsMACAddr.
I think it's a bug.
#35
Hi,

I have an during make process in a centos 7:
"
make[5] : on quitte le répertoire « /root/NetXMS/netxms-2.2.5/src/server/tools/nxdbmgr »
Making all in nxminfo
make[5] : on entre dans le répertoire « /root/NetXMS/netxms-2.2.5/src/server/tools/nxminfo »
  CXX      nxminfo-nxminfo.o
  CXXLD    nxminfo
../../libnxsrv/.libs/libnxsrv.so: undefined reference to `SNMP_Variable::getValueAsMACAddr() const'
collect2: error: ld returned 1 exit status
make[5]: *** [nxminfo] Erreur 1
make[5] : on quitte le répertoire « /root/NetXMS/netxms-2.2.5/src/server/tools/nxminfo »
make[4]: *** [all-recursive] Erreur 1
make[4] : on quitte le répertoire « /root/NetXMS/netxms-2.2.5/src/server/tools »
make[3]: *** [all-recursive] Erreur 1
make[3] : on quitte le répertoire « /root/NetXMS/netxms-2.2.5/src/server »
make[2]: *** [all-recursive] Erreur 1
make[2] : on quitte le répertoire « /root/NetXMS/netxms-2.2.5/src »
make[1]: *** [all-recursive] Erreur 1
make[1] : on quitte le répertoire « /root/NetXMS/netxms-2.2.5 »
make: *** [all] Erreur 2
"

with the following configuration options:
./configure --with-server --with-mysql --with-agent

I have no problems in version 2.2.4.

thanks for your help.
#36
General Support / SysLocation
December 27, 2017, 12:42:31 PM
Hi,

Is it possible to create maps based on sysLocation?


Thank's.