Before using the platform, it must be configured. You can use the default options for most commands but, at a miimum, you need to tune the database parameters first.
Entire configuration is CLI (Command-line interface) based but can be saved into a config file.
Format of config file is multiline file, where each option is on one line. Format is the same as on commandline.
For example, if you want to find a setting which you need by issuing a specific command, you can either use it directly on the commandline or add to the config. There is no difference between CLI and the file option.
To further configure the platform, follow the Initial guide
Commandline:
fcpc --message "Commit message" --epoch "epoch" <command>
Config file:
--message = "Commit message"
--epoch = "epoch"
Commandline option has precedence before config file option. So you can override option set within config by the commandline.
For this example, you can override epoch:
fcpc --epoch abc ...
By default, config files are searched in /etc/fcpc/config.cli and within HOME of the current user (<HOME>/.fcpc/config.cli)
But can be overriden by -c option
fcpc -c config_file <command>
Or by env variable
export FCP_CONFIG=config_file
fcpc <command>
If you want/need to disable config file and use only commandline parameters, use the "none" keyword.
fcpc -c none ...
If you want to proceed further how to work with the platform follow the Step by step guide
There are a lot of parameters and every module can add the next bunch of parameters. You can start with next commands to find them.
fcpc help general
optional arguments:
-c CONFIG, --config CONFIG
Specify config file (default: None)
-l LOGLEVEL, --loglevel LOGLEVEL
Set logging level. Use in form module:level, use "all" to match all modules. Use "-l help" to
list all modules and levels. Repeat more times to set more modules. (default: ['all:ERROR',
'progress:WARNING', 'audit:ERROR', 'fcp:WARNING'])
--logfile LOGFILE Save log output to file. If file ends with .gz , it will be compressed. (default: False)
--modules MODULES List of modules to enable/disable, separated by comma or "all". Use "-" to disable. For
example "all,-ldap" to enable all but LDAP (default: all)
--timezone TIMEZONE Timezone to use (default: Europe/Prague)
--profiling FILE Enable profiling and save to file (default: None)
--message MESSAGE Message to add to history for this operation (default: None)
--locationid LOCATIONID
Location ID where to add or search object. Use "All" to search for all (default: all)
--organizationid ORGANIZATIONID
Organization ID where to add or search object. Use "All" to search for all (default: all)
--tag TAG Tag[s] to be set on all updated/created/deleted objects within history. (default: None)
--cd CD Change directory before run (default: None)
--write_exit_code WRITE_EXIT_CODE
Write exit code to this file (default: None)
--asset.inactive.days ASSET.INACTIVE.DAYS
How many days to tag asset as inactive (default: 30)
fcpc help module/itop
usage: fcpc module/itop [-h] [--itop.url ITOP.URL] [--itop.user ITOP.USER] [--itop.password ITOP.PASSWORD]
[--itop.fallback_location ITOP.FALLBACK_LOCATION]
[--itop.fallback_organization ITOP.FALLBACK_ORGANIZATION]
[--itop.related.depth ITOP.RELATED.DEPTH] [--itop.name_prefix ITOP.NAME_PREFIX]
[--itop.query.persons ITOP.QUERY.PERSONS] [--itop.query.hosts ITOP.QUERY.HOSTS]
itop
optional arguments:
-h, --help show this help message and exit
--itop.url ITOP.URL Itop base URL[Defined:fcplib.module.itop.cmd] (default: None)
--itop.user ITOP.USER
Itop API username[Defined:fcplib.module.itop.cmd] (default: None)
--itop.password ITOP.PASSWORD
Itop API password[Defined:fcplib.module.itop.cmd] (default: None)
--itop.fallback_location ITOP.FALLBACK_LOCATION
Itop fallback location if object location is not found. Default is to throw
error[Defined:fcplib.module.itop.cmd] (default: None)
--itop.fallback_organization ITOP.FALLBACK_ORGANIZATION
Itop fallback organization if object organization is not found[Defined:fcplib.module.itop.cmd]
(default: None)
--itop.related.depth ITOP.RELATED.DEPTH
Itop depth for searching related objects[Defined:fcplib.module.itop.cmd] (default: 1)
--itop.name_prefix ITOP.NAME_PREFIX
Itop name prefix to extract name from[Defined:fcplib.module.itop.cmd] (default: None)
--itop.query.persons ITOP.QUERY.PERSONS
Itop query to search persons[Defined:fcplib.module.itop.cmd] (default: SELECT Person)
--itop.query.hosts ITOP.QUERY.HOSTS
Itop query to search hosts[Defined:fcplib.module.itop.cmd] (default: SELECT Server UNION
SELECT VirtualHost UNION SELECT VirtualMachine UNION SELECT PC UNION SELECT NAS UNION SELECT
NetworkDevice UNION SELECT Printer )
Itop module for FCP
fcpc help command/search
usage: fcpc search [-h] [--search.filter.tag Tag] [--search.use_linktagger Bool] [--search.filter.not_tag Tag]
[--search.filter.intransaction {0,1}] [--search.filter.deleted {0,1}]
[--search.filter.limit SEARCH.FILTER.LIMIT] [--search.object.links {none,joinurls,append,count}]
[--search.show.output {cli,dot,circo}]
[QUERY ...]
positional arguments:
QUERY Query or objects[search] (default: None)
optional arguments:
-h, --help show this help message and exit
--search.filter.tag Tag
Filter objects to match only this tag.[Defined:fcplib.cmd.search] (default: None)
--search.use_linktagger Bool
Use new linktagger features for speedup[Defined:fcplib.cmd.search] (default: 0)
Choices:
0
1
--search.filter.not_tag Tag
Filter objects to match only objects missing this tag.[Defined:fcplib.cmd.search] (default:
None)
--search.filter.intransaction {0,1}
Filter objects which have transaction tag (incomplete
transactions).[Defined:fcplib.cmd.search] (default: 1)
Choices:
0
1
--search.filter.deleted {0,1}
Filter objects which are deleted.[Defined:fcplib.cmd.search] (default: 1)
Choices:
0
1
--search.filter.limit SEARCH.FILTER.LIMIT
Search limit. Will not return more than this objects. Mainly for
testing.[Defined:fcplib.cmd.search] (default: 20)
--search.object.links {none,joinurls,append,count}
How to deal with object links[Defined:fcplib.cmd.search] (default: none)
Choices:
none
joinurls
append
count
--search.show.output {cli,dot,circo}
Output format to show[Defined:fcplib.cmd.search] (default: cli)
Choices:
cli
dot
circo