Install Sample App

Connect to the Logpresso shell using SSH. You can connect as follows:

cmd> ssh -p7022 root@localhost

If port 7022 is not open, add -Daraqne.ssh.server=enabled to the Java run options, or uncomment the SSH_OPEN="enabled" entry in the config.sh file and run the Logpresso daemon.

Now install the app bundle with the bundle.install command and start the app bundle with the bundle.start command:

logpresso> bundle.install file:///C:\github\logpresso-app-examples\logpresso-sample-app\target\logpresso-sample-app-1.0.2306.0.jar
bundle [133] loaded

logpresso> bundle.start 133
bundle 133 started.

If you are installing the bundle from a local file system, use the file:// scheme, and note that the file path must start with /.

Since we'll be using the REST API to test the app's functionality, we'll issue an additional API key by running the sonar.generateApiKey command.

logpresso> sonar.generateApiKey xeraph
new api key is f1382075-2be1-451b-93bf-e5d52297c9e9

Configure connect profile

You can navigate to the Connect Profile menu and click the Add button to select a Sample connect profile type that has been extended by your app, as shown below.

Sample Connect Profile Type

Add a connect profile by entering https://YOUR_LOGPRESSO_IP in the Endpoint property and the API key you just issued in the API Key field.

Test query commands

Now, when you run the sample-subnet-groups command in the query menu, you see 1 result, as shown below:

서브넷 대역 그룹 조회 쿼리

If the API key setting is incorrect, a 401 Unauthorized error will occur when executing the query as shown below:

서브넷 대역 그룹 조회 쿼리 실패

Now let's take a look at how to extend query commands in your Logpresso app.