Command Line Interface

The ConnectAgent CLI

The command line interface is a program to perform several actions on your running ConnectAgent. You can find your ConnectAgent command line interface in your <ConnectPlaza installation directory>/bin directory (for Linux) or the <ConnectPlaza installation directory>\bat directory (on Windows).

USE THIS TOOL AT YOUR OWN RISK

Enter the following command to open the help function of the CLI:

connectcmd.bat     (Windows)
    or
sh connectcmd.sh   (Linux)

You see the help function execute:

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 port
available commands:
 agentlogtail <number of bytes>                           Get a tail in KB of the connectplaza-agent.log file
 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 <interface name>                                Get the last error message for the selected interface
 getflows [interface name]                                Find all flows of the named interfaces or all flows of all interfaces
 getinterfaceloglevel <interface name>                    Get internal log level of specified interface: FULL,NORMAL,MINIMAL,TRACELOG en TRACELOGMSG
 getinterfaces                                            Get the names of all available interfaces
 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
 getproperties <interface name>                           Get the interface properties
 getsize <interface name>                                 Get the size of the bundle in Kilobytes
 getupdatereport <report>                                 Get the update reports
 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
 interfaceflows <interface name>                          Get the flow count from an interface
 license                                                  Get license information from Connect Agent
 logtail <interface name> <number of bytes>               Get the log tail from an interface
 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
 totalflows <includesystemflows>                          Get the total number of flows on the connected agent
 uninstall <bundle>                                       Stop and uninstall an interface bundle
 updatelicense <file>                                     Update the agent license with the license from file
 updatereports                                            Get all available update reports
 updates                                                  Get all available updates
 version                                                  Get the current agent version and version history in xml format

 

In our examples we use an interface with the name testFTPS.

Usage

The CLI can be used with the following command:

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 port

When using windows you will run the command connectcmd.bat

The connection to the ConnectAgent will be made via the JMX connection.
-h: Defaults to localhost
-p: Defaults to the default jmx port 9876

Commands

agentlogtail

connectcmd agentlogtail <number of bytes>

 

Description: Get the Log tail of the connectplaza-agent

Example:

# connectcmd.bat agentlogtail 2500
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: agentlogtail

Log tail from all interfaces fetching 2500 bytes:
e)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processAttributes(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
        at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:76)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadDocument(XmlBeanDefinitionReader.java:429)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:391)
        ... 8 common frames omitted
20181112 15:51:00.866 [AdapterContextStarter-mailConsumerAttachment] INFO  c.opdion.myesb.agent.AdapterContext - Sending notification javax.management.Notification[source=com.opdion.myesb.agent.AdapterContext@43a4ff52][type=adaptercontext.state][message=AdapterContext not started.]
 20181112 15:51:01.054 [cpTaskScheduler-41] INFO  c.o.m.c.utils.RegisteredFileDeleter - testftps-3.4.0-20181112115657237.jar is marked as deleted.
 20181112 15:51:01.160 [cpTaskScheduler-41] INFO  c.o.m.c.utils.RegisteredFileDeleter - testftps-3.4.0-20181112115657237.jar is marked as deleted.

With the above command you see that you get 2500 KB of the connectplaza-agent.log file.

getbundles

connectcmd getbundles

 

Description: Get currently installed bundles

Example:

# connectcmd.bat getbundles
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: getbundles

Found installed bundels :
  connectplaza-analyze-backend-adapter-3.4.0.jar
  connectplaza-control-adapter-3.4.0.jar
  connectplaza-deploy-adapter-3.4.6-SNAPSHOT.jar
  connectplaza-reverse-http-adapter-3.4.0.jar
  connectplaza-update-adapter-3.3.0.jar
  mailconsumerattachment-3.4.0-20180320133603887.jar

With this command you will get an overview of all the deployed bundles available on your ConnectAgent. This is not an indication that these bundles are running. You can select autostart for some of the interfaces.

The .jar files are always in lower case. So the name can differ from the interface name.

getconfigurationfile

connectcmd getconfigurationfile <configuration file>

 

Description: Get a configuration file from the ConnectAgent

Example:

# connectcmd.bat getconfigurationfile connectplaza-agent.properties
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: getconfigurationfile

Get the configuration file connectplaza-agent.properties:
connect.mbean.server.connector.url=service:jmx:jmxmp://10.1.0.184:9876
connect.mbean.defaultdomain=com.opdion.myesb
connect.mbean.connectdomain=com.opdion.myesb.connect.management
connect.mbean.sidomain=com.opdion.myesb.si
connect.mbean.componentindex.asattribute=false
connect.mbean.componentindex.inname=true
connect.activemq.broker.uri=vm://localhost
connect.activemq.broker.persistent=true
connect.activemq.broker.systemusage.memoryusage=64mb
connect.activemq.broker.systemusage.storeusage=10gb
connect.activemq.broker.systemusage.tempusage=2gb
connect.amqp.host=localhost
connect.amqp.port=5672
connect.amqp.username=guest
connect.amqp.password=guest
connect.network.interfacename=eth0
connect.jetty.connector.host=10.1.0.184
connect.jetty.connector.port=8088
connect.jetty.connector.maxidletime=30000
connect.jetty.connector.acceptors=2
connect.jetty.sslconnector.host=10.1.0.184
connect.jetty.sslconnector.port=8443
connect.jetty.sslconnector.included.protocols=TLSv1,TLSv1.1,TLSv1.2
connect.jetty.sslconnector.maxidletime=30000
connect.jetty.sslconnector.acceptors=2
connect.jetty.sslconnector.keystore=./context/connectpaza_keystore.jks
connect.jetty.sslconnector.keystore.password=<set>
connect.jetty.sslconnector.truststore=./context/connectplaza_truststore.jks
connect.jetty.sslconnector.truststore.password=<set>
connect.taskexecutor.poolsize=5-40
connect.taskexecutor.queue.capacity=20000
connect.taskscheduler.poolsize=50
connect.globalpoller.fixed-delay=50       // poller will poll next queue after this time ( or repeatedly all queues after this time?)
connect.globalpoller.receive-timeout=500  // poller thread will wait this time for message to arrive on polled queue, after that thread will return to pool
connectplaza.flow.taskexecutor.queue.capacity=200
connectplaza.flow.taskexecutor.poolsize=20
connect.license.owner=dummy
connect.license.key=NUP5-19YX-AJMY-JS2V-523T
connect.license.cloud=true
connect.cloudserver.uri=https://test.connectplaza.com:8443
connect.adapters.donotstart=
connect.http.proxyHost=
connect.http.proxyPort=
connect.http.proxyUser=
connect.http.proxyPassword=
connect.https.proxyHost=
connect.https.proxyPort=
connect.https.proxyUser=
connect.https.proxyPassword=
connect.analyze.connectionfactory=connectionFactory
connect.analyze.queue=queue.analyze
connect.connectionfactory.name=activeMQFactory
connect.ssl.ca.truststore=true
connect.lfs.timeout=3600
connect.analyze.storagetype=SQL
connect.adapter.myesbcommon.storechannel.storedirectory=./temp/storechannel
connect.adapter.myesbcommon.mailchannel.smtp.host=test
connect.adapter.myesbcommon.mailchannel.smtp.port=25
connect.adapter.myesbcommon.mailchannel.smtp.username=test
connect.adapter.myesbcommon.mailchannel.smtp.password=test
connect.adapter.myesbcommon.mailchannel.smtp.to=test
connect.adapter.myesbcommon.mailchannel.smtp.from=test
connect.adapter.myesbcommon.mailchannel.smtp.subject=Exception Report
connect.adapter.myesbcommon.mailchannel.smtp.starttls=false
connect.adapter.myesbcommon.mailchannel.smtp.maildebug=false

With this command you will get an overview of the files in your conf directory. The following input can be given as an argument for this command:

Property files:

  • connectplaza-agent.properties
  • connectplaza-analyze.properties
  • connectplaza-security.properties

Logback files (settings for your logging, concerning your interfaces). These are files which have your logging settings. Every interface you create will have a file starting with logback, followed by an _ and your interface name. The extension is always .xml. For instance, for our testFTP interface, it will be logback_testFTPS.xml. Let's try this:

# connectcmd.bat getconfigurationfile logback_testFTPS.xml
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: getconfigurationfile

Get the configuration file logback_testFTPS.xml:
<?xml version="1.0" encoding="UTF-8"?>
<appender name="dailyRollingFileAppender" class="com.opdion.myesb.logback.SpecifiedHourRollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- keep 30 days' worth of history (30*24=720 hours)-->
<logger name="com.opdion.myesb.connect" additivity="true" level="INFO"/>
<logger name="com.opdion.myesb.connect.service" additivity="true" level="INFO"/>
<logger name="com.opdion.myesb.connect.log" additivity="true" level="INFO"/>
<level value="WARN" />
<appender-ref ref="dailyRollingFileAppender" />

There is always a default setting for your logfiles. You can find this in the file logback.xml.

getdatetime

connectcmd getdatetime <interface name>

 

Description: Get the installation date and time of this interface

Example:

# connectcmd.bat getdatetime testFTPS
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: getdatetime

Interface installation date:
2018/11/12 16:09:56

With this command you can get the installation date of this interface.

geterror

connectcmd geterror <interface name>

 

Description: Get the last error message raised for the selected interface

Example:

# connectcmd.bat geterror testFTPS
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: geterror

Last error message not set

With this command you retrieve the last error message for a selected interface. In this case no errors were raised.

getflows

commandcmd getflows [interface name]

 

Description:  Find all flows of the named interfaces or all flows of all interfaces

Example:

# connectcmd.bat getflows testFTPS
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: getflows

Searching flows on interface testFTPS
Found flows:
   testFTPS.FTPS-RM
   testFTPS.FTPS-MGET
   testFTPS.ftpsConsumerImplicit
   testFTPS.FTPS-GET
   testFTPS.FTPS-LS
   testFTPS.FTPS-MV

With this command, you get an overview of all the flows in the selected interface.

getinterfaceloglevel

commandcmd getinterfaceloglevel <interface name>

 

Description: Get the internal log level of the specified interface: FULL,NORMAL,MINIMAL,TRACELOG en TRACELOGMSG

Example:

# connectcmd.bat getinterfaceloglevel testFTPS
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: getinterfaceloglevel

Log level of interface testFTPS: NORMAL

With this command you retrieve the log level setting of your selected interface.

getinterfaces

commandcmd getinterfaces

 

Description: Get the names of all available interfaces

Example:

# connectcmd.bat getinterfaces
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: getinterfaces

Found interfaces:
 connectplaza-license-adapter
 connectplaza-analyze-backend-adapter
 connectplaza-reverse-http-adapter
 connectplaza-deploy-adapter
 connectplaza-update-adapter
 mailConsumerAttachment
 testFTPS
 connectplaza-control-adapter

With this command you will get an overview of all the interfaces installed on your ConnectAgent.

getlocation

commandcmd getlocation <interface name>

 

Description: Get the location of this interface

Example:

# connectcmd.bat getlocation testFTPS
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: getlocation

Interface location:
E:\data\agent-testomgeving-350\connectplaza-agent\adapters\testftps-3.4.0-20181112115657237.jar

With this command you can retrieve the location of your installed bundle file on your system.

getloggers

commandcmd getloggers [filter]

 

Description: Get all common loggers or loggers which starts with the filter

Example:

# connectcmd.bat getloggers com.connectplaza
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: getloggers

Found loggers:
 com.connectplaza
 com.connectplaza.deploy
 com.connectplaza.deploy.certificates
 com.connectplaza.deploy.certificates.CertificateUtils
 com.connectplaza.deploy.support
 com.connectplaza.deploy.support.ConnectPlazaBundle
 com.connectplaza.lfs
 com.connectplaza.lfs.LargeFileSupportStore
 com.connectplaza.thread
 com.connectplaza.thread.ConnectPlazaThreadCreator

With this command you can get all the possible loggers from the system. You will probably never use this without help from support.

getloglevel

commandcmd  getloglevel [interface name] <logger>

 

DescriptionGet the log level of the specified logger in the agent or inside an interface: INFO, DEBUG, ERROR, WARN, FATAL

Example:

# connectcmd.bat getloglevel testFTPS
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: getloglevel

Log level of logger testFTPS: ERROR

With this command you can retrieve the actual log level of the selected interface.

getproperties

commandcmd getproperties <interface name>

 

Description: Get the interface properties

Example:

# connectcmd.bat getproperties testFTPS
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: getproperties

Interface properties:
testFTPS.FTPS-MGET.file-pickup-1.directory=./temp/input-mget
testFTPS.ftpsConsumerImplicit.ftp-pickup-1.port=990
testFTPS.FTPS-MV.file-pickup-1.directory=./temp/input-mv
testFTPS.ftpsConsumerImplicit.ftp-pickup-1.host=10.1.0.184
testFTPS.FTPS-RM.file-pickup-1.directory=./temp/input-rm
testFTPS.FTPS-GET.file-pickup-1.directory=./temp/input-get

With this command you can retrieve all the dynamic properties set in your interface. These include the global properties. After building the interface, there is no way to separate the global properties from the local dynamic properties. In the bundle they are all the same. See next example, we have a global property with the name YearCopyright and a value of 2018.

If we run the getproperties command again, the following properties are returned.

# connectcmd.bat getproperties testFTPS
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: getproperties

Interface properties:
testFTPS.FTPS-MGET.file-pickup-1.directory=./temp/input-mget
testFTPS.ftpsConsumerImplicit.ftp-pickup-1.port=990
testFTPS.FTPS-MV.file-pickup-1.directory=./temp/input-mv
YearCopyright=2018
testFTPS.ftpsConsumerImplicit.ftp-pickup-1.host=10.1.0.184
testFTPS.FTPS-RM.file-pickup-1.directory=./temp/input-rm
testFTPS.FTPS-GET.file-pickup-1.directory=./temp/input-get

You can see that between the properties there is the YearCopyright property with a value of 2018.

getsize

commandcmd getsize <interface name>

 

Description: Get the size of the bundle in kilobytes

Example:

# connectcmd.bat getsize testFTPS
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: getsize

Bundle size:
3461 KB

With this command you can retrieve the size in KB of the selected interface bundle, i.e., the .jar file.

getupdatereport

commandcmd getupdatereport <report>

 

Description: Get the update reports

Example:

# connectcmd.bat getupdatereport report.txt
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: getupdatereport

Get update report:
This is a report update file for test purposes

With this command you can retrieve a selected update report. This is a text file. To discover the name of this text file, you can first run the command update reports which returns all the available updatereports.

getupdatetillversion

commandcmd getupdatetillversion

 

Description: Get the latest version this ConnectAgent will upgrade to

Example:

# connectcmd.bat getupdatetillversion
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: getupdatetillversion

Update till version:
3.4.1-SNAPSHOT

With this command you can get the version number to update to. In our example this is 3.4.1-snaphot. If version 3.4.2 was released, the ConnectAgent will not update itself. It is important to check your updatetillversion settings in your environment. Keep in mind that releases for ConnectPlaza, preferably, must be tested with your own environment, before rolling out this release on your production environment. A preferred setting for your production environment is usually OFF.

install

commandcmd install <bundle> [autostart]

 

Description:  Install a new interface bundle and instantiate it if autostart != false

Example:

# connectcmd.bat install c:\tmp\testmail-3.4.0-20181106091141861.jar
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: install

Install interface bundle c:\tmp\testmail-3.4.0-20181106091141861.jar
Interface installed in context: testMail
Start interface context testMail
2018-11-13T09:26:43.816 Notification: State changed OldValue:OFFLINE NewValue:STARTING
2018-11-13T09:26:44.217 Notification: State changed OldValue:STARTING NewValue:ONLINE
2018-11-13T09:26:44.223 Notification: AdapterContext is started
State ONLINE
Configurations successfully started

With this command you can install a bundle in your ConnectAgent. After installation, this interface will be visible in your Deploy frontend.

We do not prefer you use this way of uploading bundles to the ConnectAgent. If you want to upload bundles to the ConnectAgent use the Deploy frontend for this.

interfaceflows

commandcmd interfaceflows <interface name>

 

Description: Get the flow count from an interface

Example:

# connectcmd.bat interfaceflows testFTPS
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: interfaceflows

Interface flows count:
6

With this command you can retrieve the number of flows in your interface. This is important, because this number can affect your license.

license

commandcmd license

 

Description: Get license information from Connect Agent

Example:

# connectcmd.bat license
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: license

License information: cloud license AA11-BB22-CC33-DD44-EE55

With this command you can retrieve your ConnectPlaza license key.

logtail

commandcmd logtail <interface name> <number of bytes>

 

Description: Get the log tail from an interface

Example:

connectcmd.bat logtail testFTPS 2500
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: logtail

Log tail of testFTPS fetching 2500 bytes:
ingEndpoint.doPoll(AbstractPollingEndpoint.java:224)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint.access$000(AbstractPollingEndpoint.java:57)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:176)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:173)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:330)
        at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:55)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.messaging.MessagingException: Failed to execute on session; nested exception is java.io.FileNotFoundException: E:\data\agent-testomgeving-350\connectplaza-agent\.\temp\ftp\testFTPS_ftpsConsumerImplicit_ftp-pickup-1\Irado.sql.DOWNLOAD (The process cannot access the file because it is being used by another process)
        at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:419)
        at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.synchronizeToLocalDirectory(AbstractInboundFileSynchronizer.java:223)
        ... 13 common frames omitted
Caused by: java.io.FileNotFoundException: E:\data\agent-testomgeving-350\connectplaza-agent\.\temp\ftp\testFTPS_ftpsConsumerImplicit_ftp-pickup-1\Irado.sql.DOWNLOAD (The process cannot access the file because it is being used by another process)
        at java.io.FileOutputStream.open0(Native Method)
        at java.io.FileOutputStream.open(Unknown Source)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at java.io.FileOutputStream.<init>(Unknown Source)
        at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.copyFileToLocalDirectory(AbstractInboundFileSynchronizer.java:286)
        at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer$1.doInSession(AbstractInboundFileSynchronizer.java:234)
        at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer$1.doInSession(AbstractInboundFileSynchronizer.java:223)
        at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:410)
        ... 14 common frames omitted

With this command you can get a tail of the log file of the selected interface. You can select the number of KB you want to retrieve.

monitor

commandcmd monitor [Bean name properties in form key=value,key=*,*]

 

Description: Monitor agent notifications, stop with Ctrl-C

restart

commandcmd restart

 

Description: Restart a connect agent

Example:

# connectcmd.bat restart
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: restart

You can restart your ConnectAgent with this command


setinterfaceloglevel

commandcmd setinterfaceloglevel <interface name> <level>

 

Description: Set the internal log level for the interface: FULL,NORMAL,MINIMAL,TRACELOG en TRACELOGMSG

Example:

# connectcmd.bat setinterfaceloglevel testFTPS FULL
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: setinterfaceloglevel

Log level of interface testFTPS changed from NORMAL to FULL

With this command you can instantly set the log level your interface.

setloglevel

commandcmd setloglevel [interface name] <logger> <level>

 

Description: Set the log level of the specified logger in the agent or inside an interface: INFO, DEBUG, ERROR, WARN, FATAL

Example:

# connectcmd.bat setloglevel com.connectplaza INFO
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: setloglevel

Log level of logger com.connectplaza changed from WARN to INFO

With this command you can set the log level for your loggers. You can retrieve the loggers with the getloggers command. Do not use this command without assistance of ConnectPlaza employees.

setupdatetillversion

commandcmd setupdatetillversion <version>

 

Description: Set the latest version this connected agent will upgrade to

Example:

# connectcmd.bat setupdatetillversion 3.5.0-RELEASE
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: setupdatetillversion

Setting update till version: 3.5.0-RELEASE

With this command you can set the requested update till version level of your ConnectAgent. If you want to reset the update till version number, just set the version to None.

shutdownagent

commandcmd shutdownagent

 

Description: Terminate the ConnectAgent

Example:

# connectcmd.bat shutdownagent
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: shutdownagent

Agent shutting down...

With this command you can shut down your ConnectAgent.

start

commandcmd start <interface name>

 

Description:  Start an interface context if not yet started and return the state

Example:

# connectcmd.bat start testFTPS
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: start

2018-11-13T09:52:39.467 Notification: State changed OldValue:OFFLINE NewValue:STARTING
2018-11-13T09:52:40.198 Notification: State changed OldValue:STARTING NewValue:ONLINE
2018-11-13T09:52:40.206 Notification: AdapterContext is started
State ONLINE
Configurations successfully started

With this command you can start a specific interface in your configuration.

status

commandcmd status <interface name>

 

Description: Get the interface state: ONLINE, OFFLINE, STARTING, STOPPING

Example:

# connectcmd.bat status testFTPS
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: status

ConnectAgent state: ONLINE

With this command you can retrieve the status of the selected interface.

stop

commandcmd stop <interface name>

 

Description: Stop an interface context if not yet stopped and return the state

Example:

# connectcmd.bat stop testFTPS
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: stop

2018-11-13T09:51:50.750 Notification: State changed OldValue:ONLINE NewValue:STOPPING
2018-11-13T09:51:50.867 Notification: State changed OldValue:STOPPING NewValue:OFFLINE
2018-11-13T09:51:50.869 Notification: AdapterContext is stopped
State OFFLINE
Configurations successfully stopped

With this command you can stop a specific interface in your configuration.

totalflows

commandcmd totalflows <includesystemflows>

 

Description: Get the total number of flows on the connected agent

Example:

Not yet implemented


uninstall

 uninstall <bundle>

 

Description: Stop and uninstall an interface bundle

Example:

# connectcmd.bat uninstall testmail-3.4.0-20181106091141861.jar
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: uninstall

Uninstall interface bundle testmail-3.4.0-20181106091141861.jar

With this command you can uninstall a bundle from your ConnectAgent. To get the correct bundle name you can use the getbundles command to get an overview of the installed bundles. This is not the preferred way to uninstall a bundle from your ConnectAgent. The preferred way is to use your Deploy frontend to uninstall interfaces.

updatelicense

commandcmd updatelicense <file>

 

Description: Update the agent license with the license from file. This is only applicable if you run a ConnectAgent which is not connected to the internet. Just upload the license.lic file sent to you by ConnectPlaza. It will replace the old licensefile.

updatereports

commandcmd updatereports

 

Description: Get all available update reports

Example:

# connectcmd.bat updatereports
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: updatereports

Update reports:
report.txt

With this command you get an overview of all the update reports on your system, concerning your ConnectAgent.

updates

commandcmd updates

 

Description: Get all available updates

Example:

# connectcmd.bat updates
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: updates

Available updates:
No updates available

With this command you will get an overview of all the available updates ready for your ConnectAgent. Check the updatetillversion setting, to see if these updates are applicable.

version

commandcmd version

 

Description: Get the current agent version and version history in xml format

Example:

connectcmd.bat version
service:jmx:jmxmp://localhost:9876
ConnectPlaza Command Line Interface Tool v3.4.1-SNAPSHOT
Copyright ConnectPlaza.com 2012-2018

Connected to localhost:9876
Executing command: version

Agent version information :
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<versioning>
    <currentVersion>
        <versionName>3.4.1-SNAPSHOT</versionName>
        <installDate>2018-11-01 00:00:00</installDate>
     </currentVersion>
</versioning>

With this command you get an overview of the license history file.