- Zenoss 5.x
- Zenoss 4.x
The zenindextool python script (available as part of the zenoss.toolbox project on Github - https://github.com/zenoss/zenoss.toolbox) is a tool to reindex top-level organizers. This tool was originally included as part of zencatalogscan.
Zenindextool can reindex Devices, DeviceSearch, Events, Manufacturers, Networks, and Services. As a general rule, reindexing is not required. However, if reindexing is recommended, you can use this script.
Zenoss 5.x Requirements
Because Zenoss 5.x uses container technology, it is necessary to stop some containers prior to running the tool. Stopping the containers is necessary because it is not possible for Zenindextool to commit changes to the database(s) with the containers running. The containers that must be stopped, include:
- Log into the master.
- Stop each of the containers.
- When the tool completes, restart the stopped containers.
Zenoss 4.x Requirements
It is necessary to stop some daemons prior to running the tool. If a modeling change occurs during an index, modelling will cause indexing to fail. The daemons that must be stopped, include:
- Log into the master.
- Stop the following daemons:
- If the system includes remote hubs, log into each one and stop the zenhub daemon:
- When the tool completes, restart the stopped daemons.
Using the zenindextool Script
zenindextool.py [-h] [-v] [-v10] [--tmpdir TMPDIR] [-s] [-l] [-t TYPE]
- zenindextool -
- re-indexes top-level DMD organizers -
|-h, --help||show this help message and exit|
|-v, --version||show program's version number and exit|
|-v10, --debug||debug verbose log output (debug logging)|
|--tmpdir TMPDIR||override the TMPDIR setting|
|-s, --skipEvents||skip creating summary events|
|-l, --list||output all supported reIndex() types|
|-t TYPE, --type TYPE||specify which type to reIndex()|
Example Script Output
[2016-02-18 12:30:41] Initializing zenindextool v2.0.0 (detailed log at /opt/zenoss/log/toolbox/zenindextool.log) [2016-02-18 12:30:45] Reindexing/rebuilding DeviceSearch ... Refreshing catalog: zport/dmd/Devices/deviceSearch: Process started (1 objects to go) Refreshing catalog: zport/dmd/Devices/deviceSearch: Process terminated. Duration: 0.01 seconds finished [2016-02-18 12:30:45] Execution finished in 0:00:04