@@ -35,13 +35,17 @@ For example, the following PromQL query will return an estimate of the number of
3535
3636## Compatibility
3737
38- * cassandra-exporter* is has been tested with :
38+ * cassandra-exporter* is now Cassandra 4.0+ compatible, but the change is not a backwards compatible. Support for older Cassandra versions is via the older releases, as follows :
3939
40- | Component | Version |
40+ | Cassandra Version | Compatible Exporter Version |
4141| -----------------| ---------------|
42- | Apache Cassandra| 3.0.17 (experimental), 3.11.2, 3.11.3 |
43- | Prometheus | 2.0 and later |
42+ | Apache Cassandra 4.x | 0.9.12 |
43+ | Apache Cassandra 3.0.17, 3.11.2, 3.11.3 | 0.9.11 |
4444
45+ | Prometheus Version |
46+ | -----------------|
47+ | 2.42.0
48+ |
4549Other Cassandra and Prometheus versions will be tested for compatibility in the future.
4650
4751## Usage
@@ -409,6 +413,137 @@ We suggest viewing the metrics endpoint (e.g., <http://localhost:9500/metrics>)
409413are exported by your Cassandra node.
410414
411415
416+ ## Testing
417+
418+ ### Java
419+ There are unit tests in the various projects which will get executed with the maven commands.
420+
421+ ### Integration test harness
422+
423+ There is an integration test harness available in the * /test/* folder.
424+ This harness is a work in progress, and is currently only useful for manual verification.
425+
426+ #### Requirements
427+
428+ The test harness uses Python (tested with 3.10).
429+
430+ Initialise the project by using the pyproject.toml file
431+
432+ pip install .
433+
434+ The tool can be launched via
435+
436+ python test_tool.py
437+
438+ #### Operation
439+
440+ There are four modes of operation:
441+
442+ - ` benchmark `
443+
444+ Not Implemented - TBA - Intended to test the speed of collection.
445+
446+ - ` demo `
447+
448+ Usage: test_tool.py demo [OPTIONS]
449+
450+ Start a Cassandra cluster with cassandra-exporter installed (agent or
451+ standalone). Optionally setup a schema. Wait for ctrl-c to shut everything
452+ down.
453+
454+ Working Directory:
455+ -C, --working-directory PATH location to install Cassandra and/or Prometheus.
456+ Must be empty or not exist. Defaults to a
457+ temporary directory.
458+ --cleanup-working-directory [on-error|always|never]
459+ how to delete the working directory on exit:
460+ "on-error": delete working directory on exit
461+ unless an error occurs, "always": always delete
462+ working directory on exit, "never": never delete
463+ working directory. [default: on-error]
464+
465+ Cassandra:
466+ --cluster-name TEXT name of the Cassandra cluster [default: test-
467+ cluster]
468+ --cassandra-version TEXT Cassandra version to run [default: 4.1.0]
469+ --topology DCS RACKS NODES number of data centers, racks per data center,
470+ and nodes per rack. [default: 2, 3, 1]
471+ -j, --exporter-jar PATH path of the cassandra-exporter jar to use,
472+ either agent or standalone builds, or one of
473+ "agent" or "standalone" for the currently built
474+ jar of that type in the project directory
475+ (assumes that the sources for this test tool are
476+ in the standard location within the project, and
477+ that the jar(s) have been built). [default:
478+ agent]
479+ -s, --schema PATH path of the CQL schema YAML file to apply on
480+ cluster start. The YAML file must contain a list
481+ of CQL statement strings, which are applied in
482+ order. [default: /root/source/forks/cassandra-
483+ exporter/test/schema.yaml]
484+
485+ - ` dump `
486+
487+ Usage: test_tool.py dump [OPTIONS] COMMAND [ARGS]...
488+
489+ Commands to capture, validate and diff metrics dumps
490+
491+ Options:
492+ --help Show this message and exit.
493+
494+ Commands:
495+ capture Start a Cassandra cluster, capture metrics from each node's...
496+ diff Compare two metrics dumps and output the difference
497+ validate Validate a metrics dump using Prometheus's promtool.
498+
499+ - ` e2e ` - * Note no tests are run at the moment*
500+
501+ Usage: test_tool.py e2e [OPTIONS]
502+
503+ Run cassandra-exporter end-to-end tests.
504+
505+ - Start C* with the exporter JAR (agent or standalone).
506+ - Setup a schema.
507+ - Configure and start prometheus.
508+ - Wait for all scrape targets to get healthy.
509+ - Run some tests.
510+
511+ Working Directory:
512+ -C, --working-directory PATH location to install Cassandra and/or
513+ Prometheus. Must be empty or not exist.
514+ Defaults to a temporary directory.
515+ --cleanup-working-directory [on-error|always|never]
516+ how to delete the working directory on exit:
517+ "on-error": delete working directory on exit
518+ unless an error occurs, "always": always delete
519+ working directory on exit, "never": never
520+ delete working directory. [default: on-error]
521+
522+ Cassandra:
523+ --cluster-name TEXT name of the Cassandra cluster [default: test-
524+ cluster]
525+ --cassandra-version TEXT Cassandra version to run [default: 4.1.0]
526+ --topology DCS RACKS NODES number of data centers, racks per data center,
527+ and nodes per rack. [default: 2, 3, 1]
528+ -j, --exporter-jar PATH path of the cassandra-exporter jar to use,
529+ either agent or standalone builds, or one of
530+ "agent" or "standalone" for the currently built
531+ jar of that type in the project directory
532+ (assumes that the sources for this test tool
533+ are in the standard location within the
534+ project, and that the jar(s) have been built).
535+ [default: agent]
536+ -s, --schema PATH path of the CQL schema YAML file to apply on
537+ cluster start. The YAML file must contain a
538+ list of CQL statement strings, which are
539+ applied in order. [default:
540+ /root/source/forks/cassandra-
541+ exporter/test/schema.yaml]
542+
543+ Prometheus Archive: [mutually exclusive]
544+ --prometheus-version TAG
545+ --prometheus-archive PATH/URL
546+
412547## Unstable, Missing & Future Features
413548
414549See the [ project issue tracker] ( https://github.com/instaclustr/cassandra-exporter/issues ) for a complete list.
0 commit comments