Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

M

madmucho

@madmucho
Unfollow Follow
About
Posts
21
Topics
9
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • netxms agent RHEL, turn off packages monitor
    M madmucho
    Support

    Dear support team is there way to stop collecting and processing rpm packages on RHEL installation of agent?

    We have currently problem with corruption on rpm db which causes huge amount of packages removed and added and agent reads them. This issue is looks like Redhat bug, but i have all installation updated and same behavior occurs on another RHEL 8 servers.

    I don't want unmonitor this server, just want skip packages processing. Is there any option's on agent to stop collecting rpm db data ?


  • Database schema upgrade, sqlite
    M madmucho
    Support

    Thank You Victor,
    after sqlite db modification update procedure continues and done successfully.

    Ok then i will create new base image and put it on dockerhub for other to use version with this manual fix.
    But upgrade from old image will still be not possible because after docker start i begin upgrading db schema, and if user have old sqlite db it will not upgrade correctly, nxdbmgr hangs and because it is in entry point of docker image, docker image will not start up netxms service and agent.

    Please it is possible make fix it into nxdbmgr, to do same manual fix? If it will be in new version i will release docker image with this fix, upgrade procedure will be automatic.

    @victor said in Database schema upgrade, sqlite:

    Next it tries to open second connection to database, which I suppose is not working for SQLite. Do you have any network maps configured?

    If you DO NOT have any network maps, you can do this step manually by executing the following queries (it will delete any configured links on network maps):

    DROP TABLE network_map_links;
    CREATE TABLE network_map_links
    (
      map_id integer not null,
      link_id integer not null,
      element1 integer not null,
      element2 integer not null,
      link_type integer not null,
      link_name varchar(255) null,
      connector_name1 varchar(255) null,
      connector_name2 varchar(255) null,
      element_data varchar null,
      flags integer not null,
      color_source integer not null,
      color integer not null,
      color_provider varchar(255) null,
      PRIMARY KEY(map_id,link_id)
    );
    CREATE INDEX idx_network_map_links_map_id ON network_map_links(map_id);
    UPDATE metadata SET var_value='9' WHERE var_name='SchemaVersionMinor';
    

    And then run nxdbmgr upgrade again - it should continue from next step.

    Best regards,
    Victor


  • Database schema upgrade, sqlite
    M madmucho
    Support

    Dear Victor,
    thank you for reply.

    nxdbmgr -t update
    

    Output is attached in screen and last query in text.

    CREATE TABLE new_network_map_links (   map_id integer not null,   link_id integer not null,   element1 integer not null,   element2 integer not nul
    l,   link_type integer not null,   link_name varchar(255) null,   connector_name1 varchar(255) null,   connector_name2 varchar(255) null,   element_dat
    a varchar null,   flags integer not null,   color_source integer not null,   color integer not null,   color_provider varchar(255) null,   PRIMARY KEY(
    map_id,link_id))
    

    1.PNG


  • Database schema upgrade, sqlite
    M madmucho
    Support

    Dear support team,
    i have problem with my sqlite database which im using in docker image on debian 10 base, im unable to upgrade database schema from version 39.8 to 39.9

    before i write this forum topic i check consistency of migrated db, and all checks are ok.

    Upgrade db schema ends in step 39.8 to 39.9 and not continue further, any idea what to check ?

    Docker image is avalible here > https://hub.docker.com/repository/docker/madmucho/netxms/general
    i stopped all services in docker using supervisorctl stop all
    update distro packages and during package update process upgrade schema hangs.

    In attachment is screen of update proces on which step upgrade stops and not continue further.


    jaj.PNG


  • Memory peak usage at startup, till swap begins
    M madmucho
    Support

    @victor said in Memory peak usage at startup, till swap begins:

    Hi!

    Try to add the following option to netxmsd.conf:

    DBCacheConfigurationTables = no

    Best regards,
    Victor

    Thank You Victor, after configuration change memory footprint is much better now, memory peak is much smaller and server have enough RAM.
    No swaping occurs at start.


  • Memory peak usage at startup, till swap begins
    M madmucho
    Support

    Dear support team,
    i observing strange behavior in times when netxms service starting, maibe service trying to cache some data from database, but this takes a lot of memory and if memory goes empty system begins to swap some process out and in this time netxms process release a lot of memory and then starts and runs ok...its strange.

    My environment is debian 10, database is mariadb.

    Server version 3.8.267-1

    Monitored nodes 297
    Collectible DCIs  22487
    Active alarms 180012

    Mariadb has 60Gb of data.

    System has 2vCPU 10GB RAM, usually memory is at 75 percent and everything runs ok, I see problems only at startup.

    You can see a few minutes delay in startup log, in this time memory usage goes to swap, and then drops to normal.

     

    2021.04.27 16:14:32.298 *I* [logger             ] Log file opened (rotation policy 2, max size 16777216)
    2021.04.27 16:14:32.298 *D* [                   ] LIB directory set to /usr/lib/x86_64-linux-gnu/netxms
    2021.04.27 16:14:32.298 *I* [                   ] Code page set to UTF8
    2021.04.27 16:14:32.301 *I* [                   ] Platform subagent "/usr/lib/x86_64-linux-gnu/netxms/linux.nsm" successfully loaded
    2021.04.27 16:14:32.302 *I* [db.drv             ] Database driver "mariadb.ddr" loaded and initialized successfully
    2021.04.27 16:14:32.303 *D* [                   ] Local administration interface listener started
    2021.04.27 16:14:32.303 *D* [                   ] Successfully connected to database [email protected]
    2021.04.27 16:14:32.312 *D* [db.cpool           ] Database Connection Pool initialized
    2021.04.27 16:14:32.312 *D* [db.cpool           ] Database Connection Pool maintenance thread started
    2021.04.27 16:14:32.312 *I* [                   ] Server ID 3007CF4CB43E2255
    2021.04.27 16:14:32.316 *D* [db.lock            ] Database lock set
    2021.04.27 16:14:32.322 *I* [db.writer          ] DBWriter/Housekeeper interlock is OFF
    2021.04.27 16:14:32.322 *D* [core               ] Data directory set to /var/lib/netxms
    2021.04.27 16:14:32.323 *D* [                   ] Global configuration loaded
    2021.04.27 16:14:32.325 *D* [crypto             ] Validating ciphers
    2021.04.27 16:14:32.325 *D* [crypto             ]    AES-256 enabled
    2021.04.27 16:14:32.325 *D* [crypto             ]    Blowfish-256 enabled
    2021.04.27 16:14:32.325 *D* [crypto             ]    IDEA disabled (config)
    2021.04.27 16:14:32.325 *D* [crypto             ]    3DES enabled
    2021.04.27 16:14:32.325 *D* [crypto             ]    AES-128 enabled
    2021.04.27 16:14:32.325 *D* [crypto             ]    Blowfish-128 enabled
    2021.04.27 16:14:32.325 *I* [crypto             ] Crypto library initialized (OpenSSL 1.1.1d  10 Sep 2019)
    2021.04.27 16:14:32.325 *I* [crypto.cert        ] Server certificate not set
    2021.04.27 16:14:32.334 *D* [threads.pool       ] Thread pool MAIN initialized (min=8, max=256)
    2021.04.27 16:14:32.334 *D* [threads.pool       ] Thread pool AGENT initialized (min=4, max=256)
    2021.04.27 16:14:32.363 *D* [watchdog           ] Watchdog thread started
    2021.04.27 16:14:32.364 *D* [db.writer          ] Using 1 DCI data write queues
    2021.04.27 16:14:32.364 *D* [db.writer          ] Raw DCI data flush interval is 30 seconds
    2021.04.27 16:14:32.364 *D* [threads.pool       ] Thread pool NPE initialized (min=1, max=1024)
    2021.04.27 16:14:32.364 *D* [                   ] SMTP mailer thread started
    2021.04.27 16:14:32.365 *D* [                   ] SQLite version 3.27.2
    2021.04.27 16:14:32.365 *I* [db.drv             ] Database driver "sqlite.ddr" loaded and initialized successfully
    2021.04.27 16:14:34.605 *D* [                   ] SQLite version 3.27.2
    2021.04.27 16:14:34.605 *I* [db.drv             ] Database driver "sqlite.ddr" loaded and initialized successfully
    here something eats my memory few minutes
    2021.04.27 16:17:06.738 *D* [nc                 ] Loading notification channel drivers from /usr/lib/x86_64-linux-gnu/netxms/ncdrv
    2021.04.27 16:17:06.906 *D* [nc                 ] 18 notification channel drivers loaded
    2021.04.27 16:17:06.906 *D* [nc                 ] 0 notification channels added
    2021.04.27 16:17:06.907 *D* [ndd                ] Loading network device drivers from /usr/lib/x86_64-linux-gnu/netxms/ndd
    2021.04.27 16:17:06.908 *I* [ndd                ] Network device driver CAMBIUM-CNPILOT loaded successfully
    2021.04.27 16:17:06.908 *I* [ndd                ] Network device driver CAMBIUM-EPMP loaded successfully
    2021.04.27 16:17:06.924 *I* [ndd                ] Network device driver SAF-INTEGRA-B loaded successfully
    2021.04.27 16:17:06.925 *I* [ndd                ] Network device driver SYMBOL-WS loaded successfully
    2021.04.27 16:17:06.925 *I* [ndd                ] Network device driver WESTERSTRAND loaded successfully
    2021.04.27 16:17:06.926 *I* [ndd                ] Network device driver UBNT loaded successfully
    2021.04.27 16:17:06.927 *I* [ndd                ] Network device driver AT loaded successfully
    2021.04.27 16:17:06.928 *I* [ndd                ] Network device driver CATALYST-GENERIC loaded successfully
    2021.04.27 16:17:06.928 *I* [ndd                ] Network device driver CATALYST-2900XL loaded successfully
    2021.04.27 16:17:06.928 *I* [ndd                ] Network device driver CISCO-ESW loaded successfully
    2021.04.27 16:17:06.928 *I* [ndd                ] Network device driver CISCO-NEXUS loaded successfully
    2021.04.27 16:17:06.928 *I* [ndd                ] Network device driver CISCO-SB loaded successfully
    2021.04.27 16:17:06.928 *I* [ndd                ] Network device driver CISCO-WLC loaded successfully
    2021.04.27 16:17:06.928 *I* [ndd                ] Network device driver CISCO-GENERIC loaded successfully
    2021.04.27 16:17:06.928 *I* [ndd                ] Network device driver OPTIX loaded successfully
    ....
    2021.04.27 16:17:12.453 *D* [                   ] 0 startup scripts processed
    2021.04.27 16:17:12.453 *D* [                   ] Server initialization completed in 160155 milliseconds
    2021.04.27 16:17:12.454 *D* [statcoll           ] Server statistic collector thread started
    2021.04.27 16:17:12.454 *I* [                   ] NetXMS Server started
    

    After server started all working ok.
    HTop images attached from time after Netxms server is up and responding to console.

    Any idea what can cause this peak ?


    htop.PNG

    htop2.PNG


  • docker image on dockerhub info
    M madmucho
    Support

    It has been 5 Years since I created the first netxms docker image and publish it on docker hub, now it is time to update from old debian jessie to buster and server to 3.8.

    I do this image and publish it on docker hub, https://hub.docker.com/repository/docker/madmucho/netxms

    In this time there are plenty of docker images of netxms in dockerhub repository, i must say i inspire from many of them but many of them is obsolete and dont fit my needs

    Main news in 3.8 tag and current latest is that image is put to supervisord control, long running container needs from time to time upgrade some config and packages, make some tweaks, supervisord allow all configured services make changes on fly, start/stop them with no need to reboot container itself.

    If you want you can try to use it, test it and let me know you opinion.

    Idea of this image is make basic netxms server available fast, image keeps clean and minimalistic, do not take necessary dependencies to base image (not webui, not mta, no docker compose necesary) and allow You to make all this changes if you want them.

    Tested on portainer, synology docker package, vps hosting as swarm node.

    And at end, i was able to upgrade my old 2.0.2 server instance schema/data to 3.8 just using change netxmsd.conf and mariadb tables ROW_FORMAT=DYNAMIC.
    Cheers  ;D


  • SQL query failed mariadb.
    M madmucho
    Support

    Ajajaj have this db since version 2, so i try migrate data o my local and see how that works, our db has now 60gb.

    Thank you for information.


  • SQL query failed mariadb.
    M madmucho
    Support

    Dear Technical support,
    i get two SQL query failed events in my netxmsd instance, it happens again and again

    Instance is debian 10 and database mariadb, and netxms 3.5.136-1 version.

    I set up debug mode and catch as much as i can, looks like there is special char in value which cause query to fail.
    mariadb database for netxms is Charset latin1 and collation name latin1_swedish_ci

    2020.10.16 11:14:05.968 *D* [db.query           ] BEGIN TRANSACTION successful (level 1)
    2020.10.16 11:14:05.997 *D* [                   ] Node(MTFlaje.poh.cz)->getMetricFromSNMP(.1.3.6.1.2.1.31.1.1.1.11.11): dwResult=0
    2020.10.16 11:14:05.997 *D* [                   ] DataCollector(): processing DC object 368423 ".1.3.6.1.2.1.31.1.1.1.11.120" owner=183 sourceNode=0
    2020.10.16 11:14:06.015 *E* [db.drv             ] SQL query failed (Query = "INSERT INTO hardware_inventory (node_id,category,component_index,hw_type,vendor,model,location,capacity,part_number,seri
    al_number,description) VALUES (?,?,?,?,?,?,?,?,?,?,?)"): Incorrect string value: '\xC5\xA5 Eth...' for column `netxms`.`hardware_inventory`.`hw_type` at row 1
    2020.10.16 11:14:06.015 *D* [                   ] NetObj::expandText(sourceObject=108 template='Database query failed (Query: %1; Error: %2)' alarm=0 event=102620065)
    2020.10.16 11:14:06.015 *D* [event.corr         ] CorrelateEvent: event SYS_DB_QUERY_FAILED id 102620065 source netxms [108]
    
    ] EVENT SYS_DB_QUERY_FAILED [52] at {0} (ID:102620065 F:0x0001 S:4 TAGS:"") FROM netxms: Database query failed (Query: INSERT INTO hardware_inventory
     (node_id,category,component_index,hw_type,vendor,model,location,capacity,part_number,serial_number,description) VALUES (?,?,?,?,?,?,?,?,?,?,?); Error: Incorrect string value: '\xC5\xA5 Eth...' for
     column `netxms`.`hardware_inventory`.`hw_type` at row 1)
    

    Looks like unescaped value to insert.


  • caption in AlarmHistoryRetentionTime
    M madmucho
    Support

    Dear support team,
    i found small mistake while editing AlarmHistoryRetentionTime using console,
    there is value and caption for it as "seconds" should be days i think.

    In my case value is 60 days.


  • Netxms tomcat .war deploy
    M madmucho
    Support

    @victor said in Netxms tomcat .war deploy:

    /var/lib/tomcat8/webapps is where application is deployed. But working directories for applications are in /var/lib/tomcat8/work/Catalina/localhost - try to delete them.

    Best regards,
    Victor

    Thank You Victor, exactly like you write, after delete catalina work dir and start tomcat again new UI is up and running.

    Problem solved.


  • Netxms tomcat .war deploy
    M madmucho
    Support

    That is strange,

    i using tomcat8 on debian 10, so i stop it, delete working dir /var/lib/tomcat8/webapps

    start it for test, so no web working, i copy downloaded .war from web into webapps folder, it been automaticaly deployed i see v3 libs in plugins directory, but web told me same is i posted before.
     :-
    i do upgrade of previous versions using this method and was ok.

    #!/bin/bash
    
    wget -O ROOT.war https://www.netxms.org/download/releases/3.4/nxmc-3.4.284.war
    chown tomcat8:tomcat8 ROOT.war
    service tomcat8 stop
    cp -f ROOT.war /var/lib/tomcat8/webapps
    service tomcat8 start
    

  • Netxms tomcat .war deploy
    M madmucho
    Support

    Dear support team,
    i migrated to v3, and unable to get correct web ui .war file when i deploy latest .war from download section i still get app version 2.2.17 (9525) at logon screen and version conflict after login.

    Screenshot attached.


    ss.PNG


  • Oracle Subagent windows server cannot load
    M madmucho
    Support

    @victor said in Oracle Subagent windows server cannot load:

    Hi,

    oracle.ddr from Windows installer is built for Oracle client 12. You can use Oracle Instant Client - put it into NetXMS bin folder or add to system PATH.

    Best regards,
    Victor

    Thank you,
    i copied content of instantclient-basic-windows.x64-11.2.0.4.0.zip to nxagent bin folder , set up credentials, copied tnsnames.ora to bin folder

    *ORACLE
    ID = USER
    TNSName = XYZ.WORLD
    Username = USER
    Password = PASS

    Connected and queries are retrieved, Working ok.

     🙂


  • Oracle Subagent windows server cannot load
    M madmucho
    Support

    Dear Support team,
    I have problem with oracle subagent, cannot load it correctly at agent side.

    In config i have line Subagent = oracle.nsm 
    But starting agent from comand line for check if loads correctly gives me
    DB Library: Unable to load database driver module "oracle.ddr": %1 is not a valid Win32 application.

    I have oracle.ddr and oracle.nsm files in bin directory after install, looks like it calls something from oracle client installation, which is installed and working on same win server as agent is.

    Any hints what can be wrong or what is prerequirments on windows installation for oracle subagent to load correctly?

    Netxms agnet 2.2.4
    Oracle client 11.2.0


  • upgrade to v2.1 withembedded sqlite
    M madmucho
    Support

    Result of nxdbupgrade with -X to skip errors,
    all other version upgrade steps after 410 to 411 run with no errors.

    Upgrading from version 410 to 411
    >>> SELECT var_value FROM metadata WHERE var_name='TdataTableUpdated'
    >>> SELECT var_name,var_value FROM metadata WHERE var_name LIKE 'TDataTableCreationCommand_%' OR var_name LIKE 'TDataIndexCreationCommand_%'
    >>> DELETE FROM metadata WHERE var_name LIKE 'TDataTableCreationCommand_%' OR var_name LIKE 'TDataIndexCreationCommand_%'
    >>> INSERT INTO metadata (var_name,var_value) VALUES ('TDataTableCreationCommand_0','CREATE TABLE tdata_%d (item_id integer not null,tdata_timestamp integer not null,tdata_value varchar null)')
    >>> INSERT INTO metadata (var_name,var_value) VALUES ('TDataIndexCreationCommand_0','CREATE INDEX idx_tdata_%d ON tdata_%d(item_id,tdata_timestamp)')
    >>> SELECT id FROM nodes
    Converting table tdata_108: failed
    >>> DELETE FROM metadata WHERE var_name LIKE 'TDataTableCreationCommand_%' OR var_name LIKE 'TDataIndexCreationCommand_%'
    >>> INSERT INTO metadata (var_name,var_value) VALUES ('TDataTableCreationCommand_0','CREATE TABLE tdata_%d (item_id integer not null,tdata_timestamp integer not null,record_id number(20) not null,UNIQUE(record_id))')
    >>> INSERT INTO metadata (var_name,var_value) VALUES ('TDataTableCreationCommand_1','CREATE TABLE tdata_records_%d (record_id number(20) not null,row_id number(20) not null,instance varchar(255) null,PRIMARY KEY(row_id),FOREIGN KEY (record_id) REFERENCES tdata_%d(record_id) ON DELETE CASCADE)')
    >>> INSERT INTO metadata (var_name,var_value) VALUES ('TDataTableCreationCommand_2','CREATE TABLE tdata_rows_%d (row_id number(20) not null,column_id integer not null,value varchar(255) null,PRIMARY KEY(row_id,column_id),FOREIGN KEY (row_id) REFERENCES tdata_records_%d(row_id) ON DELETE CASCADE)')
    >>> INSERT INTO metadata (var_name,var_value) VALUES ('TDataIndexCreationCommand_0','CREATE INDEX idx_tdata_%d_id_timestamp ON tdata_%d(item_id,tdata_timestamp)')
    >>> INSERT INTO metadata (var_name,var_value) VALUES ('TDataIndexCreationCommand_1','CREATE INDEX idx_tdata_rec_%d_instance ON tdata_records_%d(instance)')
    >>> INSERT INTO metadata (var_name,var_value) VALUES ('TDataIndexCreationCommand_2','CREATE INDEX idx_tdata_rec_%d_id ON tdata_records_%d(record_id)')
    Rolling back last stage due to upgrade errors...
    Database upgrade failed
    root@d699ef6920c2:/opt/netxmsdb# nxdbmgr upgrade -t -X
    NetXMS Database Manager Version 2.1 Build 9012 (2.1-RELEASE) (UNICODE)
    
    Upgrading database...
    Upgrading from version 410 to 411
    >>> SELECT var_value FROM metadata WHERE var_name='TdataTableUpdated'
    >>> SELECT var_name,var_value FROM metadata WHERE var_name LIKE 'TDataTableCreationCommand_%' OR var_name LIKE 'TDataIndexCreationCommand_%'
    >>> DELETE FROM metadata WHERE var_name LIKE 'TDataTableCreationCommand_%' OR var_name LIKE 'TDataIndexCreationCommand_%'
    >>> INSERT INTO metadata (var_name,var_value) VALUES ('TDataTableCreationCommand_0','CREATE TABLE tdata_%d (item_id integer not null,tdata_timestamp integer not null,tdata_value varchar null)')
    >>> INSERT INTO metadata (var_name,var_value) VALUES ('TDataIndexCreationCommand_0','CREATE INDEX idx_tdata_%d ON tdata_%d(item_id,tdata_timestamp)')
    >>> SELECT id FROM nodes
    Converting table tdata_108: failed
    Converting table tdata_126: failed
    Converting table tdata_134: failed
    Converting table tdata_160: failed
    Converting table tdata_194: failed
    Converting table tdata_232: failed
    >>> SELECT id FROM clusters
    >>> SELECT id FROM mobile_devices
    >>> SELECT id FROM access_points
    >>> SELECT id FROM chassis
    >>> UPDATE metadata SET var_value='411' WHERE var_name='SchemaVersion'
    

    All tdata_ tables failed to convert, as i look to sources looks like something wrong is in logic of
    static BOOL H_UpgradeFromV410(int currVersion, int newVersion) function.


  • upgrade to v2.1 withembedded sqlite
    M madmucho
    Support

    Same simptoms sqlite in docker.

    nxdbmgr upgrade -t
    NetXMS Database Manager Version 2.1 Build 9012 (2.1-RELEASE) (UNICODE)

    Upgrading database...
    Upgrading from version 410 to 411
    >>> SELECT var_value FROM metadata WHERE var_name='TdataTableUpdated'
    >>> SELECT var_name,var_value FROM metadata WHERE var_name LIKE 'TDataTableCreationCommand_%' OR var_name LIKE 'TDataIndexCreationCommand_%'
    >>> DELETE FROM metadata WHERE var_name LIKE 'TDataTableCreationCommand_%' OR var_name LIKE 'TDataIndexCreationCommand_%'
    >>> INSERT INTO metadata (var_name,var_value) VALUES ('TDataTableCreationCommand_0','CREATE TABLE tdata_%d (item_id integer not null,tdata_timestamp integer not null,tdata_value varchar null)')
    >>> INSERT INTO metadata (var_name,var_value) VALUES ('TDataIndexCreationCommand_0','CREATE INDEX idx_tdata_%d ON tdata_%d(item_id,tdata_timestamp)')
    >>> SELECT id FROM nodes
    Converting table tdata_108: failed
    >>> DELETE FROM metadata WHERE var_name LIKE 'TDataTableCreationCommand_%' OR var_name LIKE 'TDataIndexCreationCommand_%'
    >>> INSERT INTO metadata (var_name,var_value) VALUES ('TDataTableCreationCommand_0','CREATE TABLE tdata_%d (item_id integer not null,tdata_timestamp integer not null,record_id number(20) not null,UNIQUE(record_id))')
    >>> INSERT INTO metadata (var_name,var_value) VALUES ('TDataTableCreationCommand_1','CREATE TABLE tdata_records_%d (record_id number(20) not null,row_id number(20) not null,instance varchar(255) null,PRIMARY KEY(row_id),FOREIGN KEY (record_id) REFERENCES tdata_%d(record_id) ON DELETE CASCADE)')
    >>> INSERT INTO metadata (var_name,var_value) VALUES ('TDataTableCreationCommand_2','CREATE TABLE tdata_rows_%d (row_id number(20) not null,column_id integer not null,value varchar(255) null,PRIMARY KEY(row_id,column_id),FOREIGN KEY (row_id) REFERENCES tdata_records_%d(row_id) ON DELETE CASCADE)')
    >>> INSERT INTO metadata (var_name,var_value) VALUES ('TDataIndexCreationCommand_0','CREATE INDEX idx_tdata_%d_id_timestamp ON tdata_%d(item_id,tdata_timestamp)')
    >>> INSERT INTO metadata (var_name,var_value) VALUES ('TDataIndexCreationCommand_1','CREATE INDEX idx_tdata_rec_%d_instance ON tdata_records_%d(instance)')
    >>> INSERT INTO metadata (var_name,var_value) VALUES ('TDataIndexCreationCommand_2','CREATE INDEX idx_tdata_rec_%d_id ON tdata_records_%d(record_id)')


  • Database migration sqlite > mysql or export
    M madmucho
    Support

    Thank you for tip,
    works ok.
    Have a nice day


  • Database migration sqlite > mysql or export
    M madmucho
    Support

    Dear users,
    i have problem on debian installation.

    i try to migrate from sqlite to mysql, i have mysql server ready db initialized and invoking migrate command with stoped netxmsd service.
    i get following.

    root@netxms:/tmp# nxdbmgr -I -t migrate /tmp/netxmsd.conf
    WARNING: invalid transaction size, reset to defaultNetXMS Database Manager Version 2.0.3 Build 8066 (UNKNOWN) (UNICODE)
    
    Database driver sqlite.ddr loaded
    Connected to source database
    
    
    WARNING!!!
    This operation will clear all configuration and collected data from destination database before migration.
    Are you sure? (Y/N) y
    >>> SELECT id FROM nodes
    >>> DELETE FROM config
    >>> DELETE FROM config_clob
    >>> DELETE FROM users
    >>> DELETE FROM user_groups
    >>> DELETE FROM user_group_members
    >>> DELETE FROM user_profiles
    >>> DELETE FROM userdb_custom_attributes
    >>> DELETE FROM object_properties
    >>> DELETE FROM object_custom_attributes
    >>> DELETE FROM zones
    >>> DELETE FROM mobile_devices
    >>> DELETE FROM access_points
    >>> DELETE FROM racks
    >>> DELETE FROM nodes
    >>> DELETE FROM clusters
    >>> DELETE FROM cluster_members
    >>> DELETE FROM cluster_sync_subnets
    >>> DELETE FROM cluster_resources
    >>> DELETE FROM subnets
    >>> DELETE FROM interfaces
    >>> DELETE FROM interface_address_list
    >>> DELETE FROM network_services
    >>> DELETE FROM vpn_connectors
    >>> DELETE FROM vpn_connector_networks
    >>> DELETE FROM object_containers
    >>> DELETE FROM conditions
    >>> DELETE FROM cond_dci_map
    >>> DELETE FROM templates
    >>> DELETE FROM dct_node_map
    >>> DELETE FROM nsmap
    >>> DELETE FROM container_members
    >>> DELETE FROM acl
    >>> DELETE FROM trusted_nodes
    >>> DELETE FROM items
    >>> DELETE FROM dc_tables
    >>> DELETE FROM dc_table_columns
    >>> DELETE FROM dct_column_names
    >>> DELETE FROM dct_thresholds
    >>> DELETE FROM dct_threshold_conditions
    >>> DELETE FROM dci_schedules
    >>> DELETE FROM raw_dci_values
    >>> DELETE FROM event_cfg
    >>> DELETE FROM event_log
    >>> DELETE FROM actions
    >>> DELETE FROM event_groups
    >>> DELETE FROM event_group_members
    >>> DELETE FROM event_policy
    >>> DELETE FROM policy_source_list
    >>> DELETE FROM policy_event_list
    >>> DELETE FROM policy_action_list
    >>> DELETE FROM policy_time_range_list
    >>> DELETE FROM policy_situation_attr_list
    >>> DELETE FROM time_ranges
    >>> DELETE FROM thresholds
    >>> DELETE FROM alarms
    >>> DELETE FROM alarm_notes
    >>> DELETE FROM alarm_events
    >>> DELETE FROM snmp_trap_cfg
    >>> DELETE FROM snmp_trap_pmap
    >>> DELETE FROM agent_pkg
    >>> DELETE FROM object_tools
    >>> DELETE FROM object_tools_acl
    >>> DELETE FROM object_tools_table_columns
    >>> DELETE FROM object_tools_input_fields
    >>> DELETE FROM syslog
    >>> DELETE FROM script_library
    >>> DELETE FROM snmp_trap_log
    >>> DELETE FROM agent_configs
    >>> DELETE FROM address_lists
    >>> DELETE FROM graphs
    >>> DELETE FROM graph_acl
    >>> DELETE FROM certificates
    >>> DELETE FROM audit_log
    >>> DELETE FROM situations
    >>> DELETE FROM snmp_communities
    >>> DELETE FROM ap_common
    >>> DELETE FROM ap_bindings
    >>> DELETE FROM ap_config_files
    >>> DELETE FROM usm_credentials
    >>> DELETE FROM network_maps
    >>> DELETE FROM network_map_elements
    >>> DELETE FROM network_map_links
    >>> DELETE FROM images
    >>> DELETE FROM dashboards
    >>> DELETE FROM dashboard_elements
    >>> DELETE FROM dashboard_associations
    >>> DELETE FROM business_services
    >>> DELETE FROM slm_checks
    >>> DELETE FROM node_links
    >>> DELETE FROM slm_agreements
    >>> DELETE FROM slm_tickets
    >>> DELETE FROM slm_service_history
    >>> DELETE FROM organizations
    >>> DELETE FROM persons
    >>> DELETE FROM job_history
    >>> DELETE FROM licenses
    >>> DELETE FROM mapping_tables
    >>> DELETE FROM mapping_data
    >>> DELETE FROM dci_summary_tables
    >>> DELETE FROM scheduled_tasks
    >>> DELETE FROM zmq_subscription
    Database successfully cleared
    Migrating table config
    ERROR: cannot prepare INSERT statement (Column 'possible_values' specified twice)
    Database migration failed.
    root@netxms:/tmp# nxdbmgr -h
    NetXMS Database Manager Version 2.0.3 Build 8066 (UNKNOWN) (UNICODE)
    

     

    i try export db and i get this

    root@netxms:/var/lib/netxms# nxdbmgr export /tmp/migrate.db
    NetXMS Database Manager Version 2.0.3 Build 8066 (UNKNOWN) (UNICODE)
    
    Exporting table config
    Segmentation fault
    

    Instalation is from debian repository not compiled version.
    Im currently on sqlite and is working, db check is ok.

    Any ideas how to fix it ?


  • docker image on dockerhub info
    M madmucho
    Support

    Hello,
    it is simple docker file i putting it here, so you can use it or help me make it better.
    after docker image is completed on my NAS I export it as backup and import again, so it basicaly flatten all layers and image is smaller.

    FROM debian:jessie
    MAINTAINER Chuck Norris
    RUN DEBIAN_FRONTEND=noninteractive apt-get update && DEBIAN_FRONTEND=noninteractive  apt-get install apt-utils -y && DEBIAN_FRONTEND=noninteractive apt-get install wget nano -y
    RUN echo 'deb http://packages.netxms.org/debian jessie main' >> /etc/apt/sources.list && wget -q -O - http://packages.netxms.org/netxms.gpg | apt-key add -
    RUN DEBIAN_FRONTEND=noninteractive apt-get update | apt-get upgrade -y
    RUN DEBIAN_FRONTEND=noninteractive apt-get install netxms-server nano snmp -y
    COPY *.conf /etc/
    RUN mkdir /opt/netxmsdb
    
    RUN nxdbmgr init /usr/share/netxms/sql/dbinit_sqlite.sql
    RUN DEBIAN_FRONTEND=noninteractive apt-get remove wget apt-utils -y && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y && DEBIAN_FRONTEND=noninteractive apt-get clean -y
    RUN rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp*
    
    VOLUME /opt/netxmsdb
    EXPOSE 4700
    EXPOSE 4701
    EXPOSE 4702
    EXPOSE 4747
    
    
    CMD ["netxmsd", "nxagentd"]
    

    About docker hub, i will think about it, for now, i dont see much reason go there, i will better consult changes here with others. But it is standart i understand.
    in atachment two copied configs


    dockerfiles.zip

  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups