Delete server/device in UIM via command line tool (v2.4)

Document created by chrlu01 Employee on Jul 4, 2016Last modified by chrlu01 Employee on Mar 14, 2017
Version 11Show Document
  • View in full screen mode

A question that I receive with (almost) every client is: How do we delete device(s) in UIM/Nimsoft (in an user friendlly way)?

The latest available doc/discussion explained that this is a multi step procedure, certainly if you want also to delete the related QoS data.


Attached zip contains a tool: nimsoft_delete_device that will remove the device in

- via discovery_server probe callback (remove from usm)

- via hub probe callback (remove from IM)

- all related QoS data

- all related MCS\SSR QoS data

- all related alarms in nas_transaction_log and nas_transaction_summary

- via the nas probe callback (nameservice_delete)


Selection parameters:

  -h: device(s) to delete

  -o: filter on origin

  -c: filter on dedicated

      (Device, VirtualMachine, Host, HostSystem)

  -r: enable regex expressions on flags -h,-o,-c (y,n) default: n

Delete parameters:

  -q: delete QoS (y,n) default: y

      (QoS will not be deleted if -c is used)

  -i: delete in hub/IM (y,n) default: y

  -a: delete alarm (y,n) default: y

  -m: delete MCS/SSR QoS entries (y,n) default: n

  -n: delete in NAS address table (y,n) default: y

Display parameters

  -l: list detailed list of selected QoS to delete (y,n) default: n

  -v: verbose on sql delete (y,n) default: y

Execution parameters

  -s: simulate run (y,n) default: y


Example: nimsoft_delete_device.exe -h"servername"

This will simulate the delete of the server "servername".  If the simulation is ok for you, you can add: -s"n"


The script is written for Windows and MSSQL/mySQL and compiled via the pp option in Strawberry Perl. The package contains the .exe and .pl versions)

In the zip file there is also a doc file that contains more info (you will need to change a file: nimsoft_generic.dat with server & user settings)


Version 1.2:

- parameter -o makes it possible to filter on origin in regex format

- mssql trusted connection can be used

Version 2.0:

- mysql added

- delete alarms in nas_transaction_log and nas_transaction_summary

- delete mcs/ssr qos and definitions

- regex is now an option

Version 2.1:

- in the search of all robotnames the tool will only search the domain specified in the nimsoft_generic.dat file

Version 2.2:

- works now with MSSQL and MySQL

- Works now on Windows and Linux (tested on Centos7)

- included compiled version for Linux (.bin) and Windows (.exe) that should work on standalone servers (but with a robot installed)

Version 2.3:

- The step to delete the device in the robot table of the hub is now based on a simple SQL query instead of (time consuming) callbacks

Version 2.4:

- the -m option is modified to be compatible with UIM 8.51.

- delete device NAS addess table with the option -n


Comments and ideas are very welcome.

(this is , like all other user written tools, only an example tool that I tested as good as possible)


Note1: this version was fully tested on 8.4.7, 8.5 and 8.51

If you want to run it on older 8.x versions you must use the -m"n" parameter so that the tool will not try to use the MCS/SSR tables from 8.4

(tested with -m"n" on 8.1 and 8.31)

Note2: if you run the tool in non-simulation mode and receive an error like: "rc=2 err=communication error from nimNamedRequest " this is probably due to an error in defining the correct variable values (specially Case is important) for uim_domain, uim_hub or uim_robot in the file nimsoft_generic.dat.  Try to use your values in the command:

pu -u administrator -p ?? /your_domain/your_hub/your_robot/discovery_server get_snmp_devices

8 people found this helpful