The source code for the Cacti CLI can be found here: https://git.geant.net/gitlab/src/cacticli The main program is CactiCli.java
The Cacti Command Line Interface (CLI) is a Java based program that is called from a Bash script called cli.sh.
The program is located on the two production Cacti servers; prod-cacti01-fra-de.geant.net and prod-cacti02-vie-at.geant.net in the directory /home/cactiuser/scripts
It is configured via a properties file called cacticli.properties
The CLI has a variety of useful functions that can be called using the following syntax
HELP
ABOUT
SHOW TEMPLATES
SHOW DEVICES
SHOW GRAPH-TREE
DELETE DS-ONLY <Data Source Id>
DELETE GRAPH-ONLY
DELETE DS-ONLY-FORCE <Data Source Id>
DISABLE DS-ONLY <Data Source Id>
ENABLE DS-ONLY <Data Source Id>
DISABLE COUNTRY <2 Character Country Code>
ENABLE COUNTRY <2 Character Country Code>
DISABLE DBEACON <Dbeacon Name>
ENABLE DBEACON <Dbeacon Name>
DISABLE CIRCUIT <Circuit Name>
ENABLE CIRCUIT <Circuit Name>
SHOW DATASOURCES <Router Name>
SHOW INTERFACES <Router Name>
DELETE DBEACON <Dbeacon Name>
DELETE CIRCUIT <Circuit Name>
DELETE COUNTRY <2 Character Country Code>
CREATE DBEACON <Something> <Something>
CREATE CIRCUIT <Something> <Something>
CREATE BEACON <Something> <Something>
CREATE SITE <Something> <Something>
CREATE COUNTRY <Something> <Something>
PLACE GRAPH <Something> <Something>
REMOVE GRAPH <Something> <Something>
CREATE GRAPH-ONLY <Something> <Something> <Something>
DELETE GRAPH-ONLY <Something> <Something> <Something>
CREATE DS-ONLY <Something> <Something> <Something>
DELETE DS-ONLY <Something> <Something> <Something>
CREATE GRAPH-WITH-DS <Something> <Something> <Something>
DELETE GRAPH-WITH-DS <Something> <Something> <Something>
SHOW GRAPH-WITH-DS <Something> <Something> <Something>
SHOW GRAPH-ONLY <Something> <Something> <Something>
SHOW DS-ONLY <Something> <Something> <Something>
REMOVE GRAPH <Something> <Something> ALL
CREATE DATASOURCE <Something> <Something> <Something> <Something>
MOVE INTERFACE <Something> <Something> <Something> <Something>
MOVE-ALL INTERFACE <Something> <Something> <Something> <Something>
CREATE DS-ONLY <Something> <Something> <Something> <Something>
CREATE GRAPH-WITH-DS <Something> <Something> <Something> <Something>
CREATE GRAPH-WITH-DS IPv6 <Something> <Something> <Something>
CREATE DS-ONLY IPv6 <Something> <Something> <Something>
CREATE GRAPH-ONLY IPv6 <Something> <Something> <Something>
CREATE DATASOURCE <Something> <Something> <Something> <Something> <Something>
MOVE INTERFACE <Something> <Something> <Something> <Something> <Something>
MOVE-ALL INTERFACE <Something> <Something> <Something> <Something> <Something>
CREATE GRAPH-WITH-DS IPv6 <Something> <Something> <Something> <Something>
CREATE DS-ONLY IPv6 <Something> <Something> <Something> <Something>
CREATE GRAPH-WITH-DS PLACE <Something> <Something> <Something> <Something>
CREATE DATASOURCE <Something> <Something> <Something> <Something> <Something> <Something>
MySQL Database Connection
The CactiCli connects to one MySQL databases:
cacti database on prod-cacti01-fra-de.geant.net using user cactiuser