Console#
i-doit has a Commandline Interface (CLI) with which you can carry out various tasks. For example, the CLI is required for Cronjobs and can be applied for the automation of work steps.
First Steps#
The CLI can be found in the i-doit installation directory, for example at /var/www/html/. Within this directory the CLI has to be activated with the same permissions as the Apache webserver. Under Debian GNU/Linux this is the user called www-data. You can achieve the permissions with sudo:
1 2 |
|
Under Windows you also have to change to the installation directory. As the permissions of the webserver are not an issue, the start of php.exe, which has to stand in the path of the user, is sufficient.
1 2 |
|
When you execute the CLI without further arguments, the general help is displayed:
Available commands
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|
Authentication Process#
In order to access i-doit via the CLI an authentication is required for most of the commands. For this purpose, you hand over a user name, the appropriate password and the desired tenant ID. With a default installation, in most cases the latter is "1".
1 2 |
|
The user "controller"
We recommend creating a dedicated user in i-doit for the application of the CLI. If this user is to be configured as local user, create it as object of the type Persons with the desired credentials in the Persons → Login category. This user should receive admin rights. The rights assignment can be carried out through allocation to the predefined Person group Admin.
Help#
Often commands are accompanied by further arguments. Therefore each command provides a help via --help:
1 2 |
|
Furthermore, some commands provide examples via --usage.
Commands#
Command | pro Version | open Version | Add-on | Description |
---|---|---|---|---|
CompileDocuments | yes | no | Documents | Compile Documents |
addon-activate | yes | yes | - | Activate add-on |
addon-deactivate | yes | yes | - | Deactivate add-on |
addon-install | yes | yes | - | Install add-on |
addon-list | yes | yes | - | Shows list of installed add-ons |
admin-center-password-reset | yes | yes | - | Reset the password for the Admin Center |
auth-cleanup | yes | yes | - | Clean up of authorization system |
check_mk-export | yes | no | Check_MK 1 | Export of configuration files for Checkmk |
check_mk-livestatus | yes | no | Check_MK 1 | Write actual status from Checkmk into log book |
clear-credentials | yes | yes | - | Removes user credentials |
completion | yes | yes | - | Dump the shell completion script |
contracts-outdated | yes | yes | - | Updates status of outdated contracts |
documents | yes | no | Documents | Create and export documents |
extend-contracts | yes | no | - | Extends Contracts with last cancellation date in the past |
help | yes | yes | - | Displays the help for a command |
import-csv | yes | no | - | Import data from a CSV file |
import-csvprofiles | yes | no | - | List all CSV import profiles |
import-hinventory | yes | yes | - | Import data from h-inventory |
import-jdisc | yes | yes | - | Import data from JDisc Discovery |
import-jdiscdiscovery | yes | yes | - | Start a scan in JDisc Discovery |
import-syslog | yes | yes | - | Import data from a Syslog into the i-doit logbook |
import-xml | yes | yes | - | Import data from XML |
install | yes | yes | - | Install the i-doit application |
ldap-sync | yes | yes | - | Import persons and person groups from an LDAP directory or Active Directory (AD) |
ldap-syncdn | yes | yes | - | Synchronise the distinguished name (DN) of the users (see LDAP category) from an LDAP/AD |
license-add | yes | no | - | Adds a license for i-doit (in progress) |
license-assign | yes | no | - | Assigns a hosting license to a client (in progress) |
license-import | yes | no | - | Imports licenses from the i-doit Server (in progress) |
license-key | yes | no | - | Sets a license key for i-doit (in process) |
license-list | yes | no | - | Lists all licenses with all information (ID; product; type; start date; end date; licensed objects; licensed clients; environment) |
license-remove | yes | no | - | Removes licenses from i-doit |
list | yes | yes | - | List console commands |
logbook-archive | yes | yes | - | Archive logbook entries |
maintenance | yes | no | Maintenance | Sends notifications of scheduled maintenance from the Maintenance Add-on |
migrate-uploaded-files | yes | yes | - | --- |
nagios-export | yes | no | Nagios | Export Nagios configuration |
nagios-ndoutils | yes | no | Nagios | Write actual status from Nagios into logbook |
notifications-list | yes | yes | - | List all notifications types and notifications for later usage |
notifications-send | yes | yes | - | Send notifications per e-mail |
report-export | yes | no | - | Export a report as file |
search | yes | yes | - | Search in i-doit |
search-index | yes | yes | - | Create/ renew search index |
strip-description-html | yes | yes | - | With this command you can strip html tags in description field of all categories and objects |
sync-dynamic-groups | yes | yes | - | Syncronize dynamic group members |
system-autoincrement | yes | yes | - | Set auto_increment of MariaDB-/MySQL tables to a positive integer value |
system-categorycleanup | yes | yes | - | Purges optionally category entries that are in the state unfinished, archived or deleted |
system-checkforupdates | yes | yes | - | Search for i-doit updates |
system-convert-non-innodb-tables | yes | yes | - | Converts all tables that are not in INNODB to INNODB (Affects the database coding. Use with caution!) |
system-convert-non-utf8-tables | yes | yes | - | Converts all non-UTF8 tables to UTF8 tables (Affects database encoding. Use with caution!) |
system-location-fix | yes | yes | - | Executes the location correction from the GUI on the console |
system-maintenancecontract | yes | no | - | Sends e-mail notifications for maintenance contracts (Function is deprecated, please use the Notification) |
system-objectcleanup | yes | yes | - | Clean up objects |
system-objectrelations | yes | yes | - | Recreate object relations |
system-refresh-table-configuration | yes | yes | - | Refresh all available list configurations (object types and categories) |
tenant-create | yes | no | - | Add a new tenant |
tenant-disable | yes | yes | - | Deactivate an existing tenant |
tenant-enable | yes | yes | - | Activate an existing tenant |
tenant-list | yes | yes | - | List all available tenants |
tenant-remove | yes | yes | - | Remove an existing tenant |
uninstall | yes | yes | - | Uninstalls i-doit |
update | yes | yes | - | Installs i-doit updates |
workflows-process | yes | no | Workfow | Process all workflows, send e-mails and create new tasks from checklists |