ConnectPlaza Agent script files
Bin and bat files, how to use them
Within the installation of the ConnectPlaza Agent you will find a bin directory and a bat directory in your installation directory.
The bat directory is used by Windows users, the bin directory is used by Linux users.
The following files are available to you:
Windows | Linux |
agent.bat | agent.sh |
connectcmd.bat | connectcmd.sh |
cpswitchversion.bat | cpswitchversion.sh |
installAgentAsAService.bat | installAgentAsAService.sh |
queryAgentService.bat | queryAgentService.sh |
runAgent.bat | runAgent.sh |
startAgentService.bat | startAgentService.sh |
stopAgentService.bat | stopAgentService.sh |
uninstallAgentService.bat | uninstallAgentService.sh |
To run them use a CLI (command line interface).
agent.sh
Command: ./agent.sh start|stop
Used to start of stop the ConnectAgent.
If the ConnectAgent is installed as a service, it will use the service command to start or stop the service. Otherwise it will use the ./runAgent.sh command to start the ConnectAgent.
connectcmd.sh
This is the ConnectPlaza Command Line Interface Tool.
Command used to get data from your ConnectAgent.
usage: connectcmd [options] <command> [arg1 arg2 ...]
-b,--brief <arg> Exclude additional information and error messages
-h,--host <arg> Connect to host
-p,--port <arg> Connect to jmx port
-u,--url <arg> Connect to url
available commands:
getagentlogtail <number of bytes> Get the Log tail from all interfaces
getavailableupdatereports Get all available update reports
getbundles Get current installed bundles
getconfigurationfile <configuration file> Get a configuration file from the connected agent
getdatetime <interface name> Get the installation date and time of this interface
geterror Get the last error message of an interface
getflows [interface name] Find all flows of the named interfaces or all flows of all interfaces
getinterfaceflows <interface name> Get the flow count from an interface
getinterfaceloglevel <interface name> Get internal log level of specified interface: FULL,NORMAL,MINIMAL,TRACELOG en TRACELOGMSG
getinterfaces Get the names of all available interfaces
getlicense Get license information from Connect Agent
getlocation <interface name> Get the location of this interface
getloggers [filter] Get all common loggers or loggers which starts with the filter
getloglevel [interface name] <logger> Get log level of specified logger in the agent or inside an interface: INFO, DEBUG, ERROR, WARN, FATAL
getlogtail <interface name> <number of bytes> Get the log tail from an interface
getproperties <interface name> Get the interface properties
getsize <interface name> Get the size of the bundle in Kilobytes
gettotalflows <includesystemflows> Get the total number of flows on the connected agent
getupdatereport <report> Get the update reports
getupdates Get all available updates
getupdatetillversion Get the latest version this connected agent will upgrade to
install <bundle> [autostart] Install a new interface bundle and instantiate it if autostart != false
monitor [Bean name properties in form key=value,key=*,*] Monitor agent notifications, stop with Ctrl-C
restart Restart a connect agent
setinterfaceloglevel <interface name> <level> Set internal log level for interface: FULL,NORMAL,MINIMAL,TRACELOG en TRACELOGMSG
setloglevel [interface name] <logger> <level> Set log level of specified logger in the agent or inside an interface: INFO, DEBUG, ERROR, WARN, FATAL
setupdatetillversion <version> Set the latest version this connected agent will upgrade to
shutdownagent Terminate connected agent
start <interface name> Start an interface context if not yet started and return the state
status <interface name> Get interface state: ONLINE, OFFLINE, STARTING, STOPPING
stop <interface name> Stop an interface context if not yet stopped and return the state
uninstall <bundle> Stop and uninstall an interface bundle (provide full name)
updatelicense <file> Update the agent license with the license from file
version Get the current agent version and version history in xml format
cpswitchversion.sh
drwxr-xr-x 3 root root 4096 Mar 16 2023 activemq-data
lrwxrwxrwx 1 root root 45 Nov 8 15:30 agent -> /opt/agent-paoomgeving-432-C7/agent-4.4.0.RC2
drwxr-xr-x 11 root root 4096 Jul 26 09:01 agent-4.3.2
drwxr-xr-x 11 root root 4096 Nov 8 15:30 agent-4.3.3
drwxr-xr-x 11 root root 4096 Jul 27 12:14 agent-4.3.3.RC2
drwxr-xr-x 11 root root 4096 Aug 4 12:14 agent-4.3.3.RC3
drwxr-xr-x 11 root root 4096 Nov 8 15:29 agent-4.4.0.RC1
drwxr-xr-x 11 root root 4096 Nov 9 13:29 agent-4.4.0.RC2
drwxr-xr-x 2 root root 4096 Mar 16 2023 endorsed
drwxr-xr-x 9 root root 4096 Nov 8 15:30 logs
drwxr-xr-x 5 root root 4096 Nov 8 11:07 temp
./cpswitchversion.sh 4.3.3
installAgentAsAService.sh
Command: ./installAgentAsAService.sh
Used to install the ConnectAgent as a service on the server.
queryAgentService.sh
Command: ./queryAgentService.sh
Running this command will return the status of the ConnectAgent.
runAgent.sh
Command: ./runAgent.sh
Used to start the connectAgent as a single proces. You can stop the ConnectAgent with the <CTRL>-C buttons. The logging will be displayed also in your console. So this is a way to debug startup problems if you have any.
startAgentService.sh
Command: ./startAgentService.sh
Used to start the ConnectAgent service.
stopAgentService.sh
Command: ./stopAgentService.sh
Used to stop the ConnectAgent service.
uninstallAgentService.sh
Command: uninstallAgentService.sh
Used to stop the agent if it is running and uninstall the service of the ConnectAgent.