Skip to content

[O11y][Cassandra] Add documentation for Jolokia setup #9817

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

harnish-crest-data
Copy link
Contributor

@harnish-crest-data harnish-crest-data commented May 8, 2024

Proposed commit message

Added detailed instructions for Jolokia setup in Apache Cassandra README.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.

Related issues

@harnish-crest-data harnish-crest-data added the enhancement New feature or request label May 8, 2024
@harnish-crest-data harnish-crest-data self-assigned this May 8, 2024
@harnish-crest-data harnish-crest-data marked this pull request as ready for review May 8, 2024 09:34
@harnish-crest-data harnish-crest-data requested a review from a team as a code owner May 8, 2024 09:34
@elasticmachine
Copy link

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

Comment on lines 13 to 15
- Java Development Kit (JDK) 1.8 or later
- Apache Cassandra 3.x/4.x (Adjust according to version)
- Jolokia agent
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Java Development Kit (JDK) 1.8 or later
- Apache Cassandra 3.x/4.x (Adjust according to version)
- Jolokia agent
- Java Development Kit (JDK) 1.8 or later
- Apache Cassandra 3.x or 4.x (depending on your version)
- Jolokia agent JAR file


1. Download the Jolokia JVM Agent:

Obtain the latest Jolokia JVM agent `.jar` file from the [Jolokia official download page](https://repo1.maven.org/maven2/org/jolokia/jolokia-jvm/).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Obtain the latest Jolokia JVM agent `.jar` file from the [Jolokia official download page](https://repo1.maven.org/maven2/org/jolokia/jolokia-jvm/).
Visit the [Jolokia official download page](https://repo1.maven.org/maven2/org/jolokia/jolokia-jvm/) to obtain the latest version of the Jolokia JVM agent JAR file. Download the `jolokia-jvm-<version>-agent.jar` file.


Obtain the latest Jolokia JVM agent `.jar` file from the [Jolokia official download page](https://repo1.maven.org/maven2/org/jolokia/jolokia-jvm/).

2. Place the Jolokia Agent:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. Place the Jolokia Agent:
2. Copy the Jolokia Agent to Cassandra's Library Directory:


2. Place the Jolokia Agent:

Copy the downloaded `.jar` file to a suitable location on the server where Cassandra is installed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Copy the downloaded `.jar` file to a suitable location on the server where Cassandra is installed.
Copy the downloaded `jolokia-jvm-<version>-agent.jar` file to the Cassandra library directory on the server where Cassandra is installed.

For example:

```bash
sudo cp jolokia-jvm-<version>-agent.jar /path/to/cassandra/lib/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
sudo cp jolokia-jvm-<version>-agent.jar /path/to/cassandra/lib/
cp jolokia-jvm-<version>-agent.jar /path/to/cassandra/lib/

Don't use sudo by default. It totally depends on perms of /path/to/cassandra/lib/ that we don't know. If they face problem they will automatically add sudo themselves.


### Jolokia Setup

To monitor Cassandra with Jolokia, need to set up the Jolokia JVM agent.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To monitor Cassandra with Jolokia, need to set up the Jolokia JVM agent.
Follow these steps to set up Jolokia for monitoring Apache Cassandra:

Comment on lines 43 to 45
4. Restart Cassandra:

After configuring Cassandra with the Jolokia agent, restart the Cassandra service to apply the changes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
4. Restart Cassandra:
After configuring Cassandra with the Jolokia agent, restart the Cassandra service to apply the changes.
4. Restart Cassandra:
Restart the Apache Cassandra service to apply the changes made to the configuration.

Comment on lines 47 to 50
Note:
- Restarting the Cassandra service will temporarily disrupt database connectivity. Dependent services may experience failures and should be designed to handle such interruptions gracefully.
- Immediately after a restart, Cassandra's performance may be impacted due to cold caches and commit log replay.
- Ensure no cluster maintenance tasks are in progress during the restart to prevent any unintended consequences.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Note:
- Restarting the Cassandra service will temporarily disrupt database connectivity. Dependent services may experience failures and should be designed to handle such interruptions gracefully.
- Immediately after a restart, Cassandra's performance may be impacted due to cold caches and commit log replay.
- Ensure no cluster maintenance tasks are in progress during the restart to prevent any unintended consequences.
> Note:
- Restarting the Apache Cassandra service will temporarily disrupt database connectivity. Ensure that dependent services are designed to handle such interruptions gracefully.
- Immediately after a restart, Cassandra's performance may be impacted due to cold caches and commit log replay. Allow some time for the system to stabilize.
- Before restarting Cassandra, ensure that no cluster maintenance tasks are in progress to prevent any unintended consequences.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note the exact steps will vary based on the installation type. For example: if cassandra is installed via kkubernetes, the steps above could be different,.

We could mention, this is representative example only and can provide minimal guideline on restart scenario.

- Restarting the Cassandra service will temporarily disrupt database connectivity. Dependent services may experience failures and should be designed to handle such interruptions gracefully.
- Immediately after a restart, Cassandra's performance may be impacted due to cold caches and commit log replay.
- Ensure no cluster maintenance tasks are in progress during the restart to prevent any unintended consequences.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we add something like:

Verifying the setup

After restarting Cassandra, you can verify that Jolokia is properly set up by accessing the Jolokia endpoint:

http://<cassandra-host>:7777/jolokia/

Replace with the hostname or IP address of your Cassandra server.

If the setup is successful, you should see a JSON response containing information about the available Jolokia operations and the Cassandra instance.

You can now use Jolokia to monitor and manage your Apache Cassandra cluster.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, this step will be useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated, thanks!

@@ -1,4 +1,9 @@
# newer versions go on top
- version: "1.12.2"
changes:
- description: Add documentation for Jolokia setup in the README.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- description: Add documentation for Jolokia setup in the README.
- description: Add documentation for setting up Jolokia to monitor Apache Cassandra in the README file.

@shmsr
Copy link
Member

shmsr commented May 8, 2024

Left some comments to make the tone of the doc consistent. Also suggested some improvements and clarified some parts where paths need to be changed. Please check.

@harnish-crest-data
Copy link
Contributor Author

Left some comments to make the tone of the doc consistent. Also suggested some improvements and clarified some parts where paths need to be changed. Please check.

Addressed, thanks! 🙌

Copy link
Contributor

@milan-elastic milan-elastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@shmsr shmsr changed the title [O11y][Cassandra] Add documentation for Jolokia setup in the README [O11y][Cassandra] Add documentation for Jolokia setup May 15, 2024
Copy link
Member

@shmsr shmsr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left one comment. Else, LGTM.

Co-authored-by: subham sarkar <sarkar.subhams2@gmail.com>
@elasticmachine
Copy link

💚 Build Succeeded

History

cc @harnish-elastic

Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@harnish-crest-data harnish-crest-data merged commit b3c56a7 into elastic:main May 16, 2024
@elasticmachine
Copy link

Package cassandra - 1.12.2 containing this change is available at https://epr.elastic.co/search?package=cassandra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Integration:cassandra Cassandra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cassandra integration add documentation for jolokia setup.
6 participants