centreon / centreon-clapi

Centreon CLAPI Module
14 stars 14 forks source link

add filter on exports #310

Closed garnier-quentin closed 9 years ago

garnier-quentin commented 9 years ago

Add the capability to filter some objects. Some examples how to use it.

Export a host and all services of the host:

php centreon -u admin -p centreon -e --select='HOST;srv-mssql-01' --filter-type='^(HOST|SERVICE)$'

Export two services (only the service):

php centreon -u superadmin -p centreon -e --select='SERVICE;memory' --select='SERVICE;mssql-listener' --filter-type='^SERVICE$'

Export all commands:

php centreon -u admin -p centreon -o CMD -a show | awk -F\; 'NR > 2 { print "--select=\"CMD;" $2 "\"" }' | xargs --verbose php centreon -u admin -p centreon -e
leoncx commented 9 years ago

Merged in branch 1.9.x