Cisco BCS (Cisco Business Critical Services) Export
This repository consists of a library and CLI utility for extracting information from the Cisco BCS Insights API.
Using the CLI
Installation
If you have Go, you can install the CLI with:
$ go install github.com/darrenparkinson/bcs-export/cmd/bcs-cli@latest
Otherwise you can download a binary for your platform from the releases page.
Configuration
In order to use the CLI, you will need the following environment variables:
BCS_APIKEY
- API Key
BCS_CUSTOMERID
- Customer ID, e.g. 280987866
BCS_DSN
- Database connection details, only required for upload command. e.g. sqlserver://<user>:<password>@<host>?database=<dbname>
You may also put them in a .env
file.
Usage
You can see detailed help as follows:
$ bcs-cli list --help
$ bcs-cli upload --help
The cli will allow you to list items and upload items to a Microsoft SQL Database (this could be expanded to support additional databases).
$ bcs-cli -h
NAME:
bcs-cli - Cisco Business Critical Services (aka BCS) insights data CLI
USAGE:
bcs-cli [global options] command [command options] [arguments...]
COMMANDS:
list, l list various objects
upload, u upload objects to the configured database
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--debug, -d enable debug logs (default: false)
--help, -h show help (default: false)
Using the library
go get github.com/darrenparkinson/bcs-export/pkg/ciscobcs