├── old-c-stats-converter ├── .gradle │ ├── 6.8.1 │ │ ├── gc.properties │ │ ├── fileChanges │ │ │ └── last-build.bin │ │ ├── fileHashes │ │ │ ├── fileHashes.bin │ │ │ ├── fileHashes.lock │ │ │ └── resourceHashesCache.bin │ │ └── executionHistory │ │ │ ├── executionHistory.bin │ │ │ └── executionHistory.lock │ ├── vcs-1 │ │ └── gc.properties │ ├── configuration-cache │ │ └── gc.properties │ ├── buildOutputCleanup │ │ ├── cache.properties │ │ ├── outputFiles.bin │ │ └── buildOutputCleanup.lock │ └── checksums │ │ ├── checksums.lock │ │ └── sha1-checksums.bin ├── settings.gradle ├── runConverter.sh ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradle.properties └── src │ └── main │ └── resources │ └── logback.xml ├── montecristo ├── src │ ├── test │ │ ├── resources │ │ │ ├── metrics │ │ │ │ ├── cloud │ │ │ │ │ ├── aws-az.txt │ │ │ │ │ └── aws-instance-type.txt │ │ │ │ ├── tm1.db │ │ │ │ └── os │ │ │ │ │ └── meminfo │ │ │ ├── helpers │ │ │ │ ├── rowCacheEnabled.yaml │ │ │ │ ├── rowCacheDisabled.yaml │ │ │ │ └── generic.yaml │ │ │ └── fileLoaders │ │ │ │ └── parsers │ │ │ │ ├── nodetool │ │ │ │ ├── gossip │ │ │ │ │ ├── gossipinfo_empty.txt │ │ │ │ │ ├── gossip_info_dse_alternative.txt │ │ │ │ │ └── gossipinfo_oss.txt │ │ │ │ ├── info │ │ │ │ │ ├── nodetool_info_empty.txt │ │ │ │ │ └── nodetool_info_complete.txt │ │ │ │ ├── describeCluster.txt │ │ │ │ └── status │ │ │ │ │ ├── nodetool_status.txt │ │ │ │ │ ├── single_dc_16_vnodes_all_UN.txt │ │ │ │ │ ├── single_dc_256_vnodes_all_UN.txt │ │ │ │ │ ├── single_dc_64_vnodes_all_UN.txt │ │ │ │ │ └── multi_dc_mixed_vnodes_all_UN.txt │ │ │ │ ├── schema │ │ │ │ ├── root-schema │ │ │ │ ├── 10.0.0.1 │ │ │ │ │ ├── schema1 │ │ │ │ │ └── schema2 │ │ │ │ ├── 10.0.0.2 │ │ │ │ │ ├── schema1 │ │ │ │ │ └── schema2 │ │ │ │ ├── 10.0.0.3 │ │ │ │ │ ├── schema1 │ │ │ │ │ └── schema2 │ │ │ │ ├── schema-with-udf.cql │ │ │ │ ├── schema_dse_types.txt │ │ │ │ ├── schema-counters.cql │ │ │ │ ├── schema.cql │ │ │ │ ├── schema-with-thrift.cql │ │ │ │ ├── schema-with-solr.cql │ │ │ │ ├── schema-with-sai.cql │ │ │ │ ├── schema-with2i.cql │ │ │ │ └── schema-with-sasi.cql │ │ │ │ ├── sstable-statistics │ │ │ │ └── keyspace1 │ │ │ │ │ ├── table1 │ │ │ │ │ ├── bb-1-bti-Statistics.db │ │ │ │ │ └── md-1-big-Statistics.db │ │ │ │ │ └── table2-uuidABCD │ │ │ │ │ └── bb-1-bti-Statistics.db │ │ │ │ ├── executionProfile │ │ │ │ └── executionProfile.yaml │ │ │ │ └── os │ │ │ │ ├── blockdev-report.txt │ │ │ │ ├── lscpu.txt │ │ │ │ └── meminfo │ │ └── kotlin │ │ │ └── com │ │ │ └── datastax │ │ │ └── montecristo │ │ │ ├── model │ │ │ ├── InstanceMetaTest.kt │ │ │ ├── nodetool │ │ │ │ └── DescribeClusterTest.kt │ │ │ └── sqlLiteMetricServerTest.kt │ │ │ ├── utils │ │ │ ├── HumanCountTest.kt │ │ │ └── MarkdownTableTest.kt │ │ │ ├── fileLoaders │ │ │ └── parsers │ │ │ │ └── application │ │ │ │ └── DseYamlParserTest.kt │ │ │ └── logs │ │ │ └── logMessageParsers │ │ │ └── GossipLogPausesWarningsMessageTest.kt │ └── main │ │ ├── resources │ │ ├── hugo │ │ │ ├── themes │ │ │ │ └── hugo-xmin-master │ │ │ │ │ ├── layouts │ │ │ │ │ ├── partials │ │ │ │ │ │ ├── foot_custom.html │ │ │ │ │ │ ├── head_custom.html │ │ │ │ │ │ ├── prev_next_links.html │ │ │ │ │ │ ├── footer.html │ │ │ │ │ │ └── header.html │ │ │ │ │ ├── 404.html │ │ │ │ │ ├── shortcodes │ │ │ │ │ │ └── svg.html │ │ │ │ │ ├── index.html │ │ │ │ │ └── _default │ │ │ │ │ │ ├── terms.html │ │ │ │ │ │ ├── list.html │ │ │ │ │ │ └── single.html │ │ │ │ │ ├── archetypes │ │ │ │ │ └── default.md │ │ │ │ │ ├── static │ │ │ │ │ └── fonts │ │ │ │ │ │ ├── Kanit-Regular.ttf │ │ │ │ │ │ ├── Roboto-Regular.ttf │ │ │ │ │ │ ├── RobotoMono-Regular.ttf │ │ │ │ │ │ └── fonts.css │ │ │ │ │ ├── hugo-xmin.Rproj │ │ │ │ │ ├── theme.toml │ │ │ │ │ ├── LICENSE.md │ │ │ │ │ └── README.md │ │ │ ├── layouts │ │ │ │ └── shortcodes │ │ │ │ │ ├── pb.html │ │ │ │ │ └── size.html │ │ │ └── _index.md │ │ ├── templates │ │ │ ├── configuration │ │ │ │ ├── configuration_snitch.md │ │ │ │ ├── configuration_memtable_storage.md │ │ │ │ ├── configuration_custom_settings.md │ │ │ │ ├── configuration_trickle_fsync.md │ │ │ │ ├── configuration_paths.md │ │ │ │ ├── configuration_java_heap_settings.md │ │ │ │ ├── recommendations │ │ │ │ │ ├── version_supported.md │ │ │ │ │ └── version_unsupported.md │ │ │ │ ├── configuration_configuration_mismatches.md │ │ │ │ ├── configuration_seeds.md │ │ │ │ ├── configuration_logging.md │ │ │ │ ├── configuration_streaming.md │ │ │ │ ├── configuration_address_bindings.md │ │ │ │ ├── configuration_compaction.md │ │ │ │ ├── configuration_node_communications.md │ │ │ │ ├── configuration_thread_pools.md │ │ │ │ ├── configuration_disk_policy.md │ │ │ │ └── configuration_ring.md │ │ │ ├── infrastructure │ │ │ │ ├── infrastructure_disk_space.md │ │ │ │ ├── infrastructure_path.md │ │ │ │ ├── infrastructure_java_version.md │ │ │ │ ├── infrastructure_swap.md │ │ │ │ ├── infrastructure_osconfig_overview.md │ │ │ │ ├── infrastructure_storage.md │ │ │ │ ├── infrastructure_ntp.md │ │ │ │ └── infrastructure_overview.md │ │ │ ├── operations │ │ │ │ ├── operations_tombstones_per_read.md │ │ │ │ ├── operations_aborted_hints.md │ │ │ │ ├── operations_table_partition_balance.md │ │ │ │ ├── operations_log_analysis_durations.md │ │ │ │ ├── operations_dropped_hints.md │ │ │ │ ├── operations_jvm_gc_stats.md │ │ │ │ ├── operations_blocked_flush_writers.md │ │ │ │ ├── operations_hinted_handoff_tasks.md │ │ │ │ ├── operations_gossip_pause.md │ │ │ │ ├── operations_commit_log_sync.md │ │ │ │ ├── operations_batches.md │ │ │ │ ├── operations_dropped_messages.md │ │ │ │ └── operations_prepared_statements_discarded.md │ │ │ ├── datamodel │ │ │ │ ├── datamodel_tablemetadata_top_tables.md │ │ │ │ ├── datamodel_gc_grace_seconds.md │ │ │ │ ├── datamodel_sstable_count.md │ │ │ │ ├── datamodel_replication.md │ │ │ │ ├── datamodel_materialized_views.md │ │ │ │ ├── datamodel_ops_center.md │ │ │ │ ├── datamodel_bloom_filters.md │ │ │ │ ├── datamodel_readrepair.md │ │ │ │ ├── datamodel_schema_unused_tables.md │ │ │ │ ├── datamodel_custom_types.md │ │ │ │ └── datamodel_schema_agreement.md │ │ │ ├── structure │ │ │ │ └── artifacts.md │ │ │ ├── security │ │ │ │ ├── security_network_encryption.md │ │ │ │ └── security_authentication.md │ │ │ └── astra │ │ │ │ └── astra_guardrails.md │ │ ├── mkhugozip.sh │ │ └── logback.xml │ │ └── kotlin │ │ └── com │ │ └── datastax │ │ └── montecristo │ │ ├── model │ │ ├── ConfigSource.kt │ │ ├── LoadError.kt │ │ ├── os │ │ │ ├── Env.kt │ │ │ ├── DStat │ │ │ │ ├── DStat.kt │ │ │ │ ├── TimeSlice.kt │ │ │ │ ├── Paging.kt │ │ │ │ ├── System.kt │ │ │ │ ├── DiskActivity.kt │ │ │ │ ├── Network.kt │ │ │ │ ├── Memory.kt │ │ │ │ └── CPUUsage.kt │ │ │ ├── Ntp.kt │ │ │ ├── GCAlgorithm.kt │ │ │ ├── IfConfig.kt │ │ │ ├── TransparentHugePageDefrag.kt │ │ │ ├── MemInfo.kt │ │ │ ├── Sysctl.kt │ │ │ ├── Configuration.kt │ │ │ └── PsAux.kt │ │ ├── schema │ │ │ ├── Caching.kt │ │ │ ├── UserDefinedType.kt │ │ │ ├── Partitioner.kt │ │ │ └── Compression.kt │ │ ├── Workload.kt │ │ ├── storage │ │ │ ├── Fstab.kt │ │ │ ├── Blockdev.kt │ │ │ ├── LsBlk.kt │ │ │ ├── DiskDevice.kt │ │ │ ├── Storage.kt │ │ │ ├── StorageLocations.kt │ │ │ └── DfSize.kt │ │ ├── nodetool │ │ │ ├── TpStats.kt │ │ │ ├── Ring.kt │ │ │ └── Status.kt │ │ ├── logs │ │ │ ├── LogSettings.kt │ │ │ ├── LogLevel.kt │ │ │ ├── IndexWriterStatistics.kt │ │ │ └── LogbackAppender.kt │ │ ├── metrics │ │ │ ├── SSTableCount.kt │ │ │ ├── Server.kt │ │ │ ├── SSTableStatistics.kt │ │ │ └── BlockedTasks.kt │ │ ├── application │ │ │ ├── JvmSettings.kt │ │ │ ├── ConfigValue.kt │ │ │ ├── DseYaml.kt │ │ │ └── ConfigurationSetting.kt │ │ └── versions │ │ │ ├── cassandra │ │ │ ├── CassandraV41x.kt │ │ │ ├── CassandraV40x.kt │ │ │ ├── CassandraV50x.kt │ │ │ └── CassandraV311x.kt │ │ │ └── dse │ │ │ ├── DseV6X.kt │ │ │ ├── DseV67X.kt │ │ │ ├── Dse6Base.kt │ │ │ ├── DseV4.kt │ │ │ ├── DseV5x.kt │ │ │ ├── DseV51x.kt │ │ │ └── DseV69X.kt │ │ ├── commands │ │ └── BaseCommand.kt │ │ ├── logs │ │ └── LogEntryGroupings.kt │ │ ├── sections │ │ └── structure │ │ │ ├── RecommendationPriority.kt │ │ │ ├── RecommendationType.kt │ │ │ ├── SectionHeadingDocument.kt │ │ │ └── CollectedArtifacts.kt │ │ ├── fileLoaders │ │ └── parsers │ │ │ ├── IFileParser.kt │ │ │ ├── os │ │ │ ├── SysCtlParser.kt │ │ │ ├── MemInfoParser.kt │ │ │ └── LsCpuParser.kt │ │ │ └── application │ │ │ ├── DseYamlParser.kt │ │ │ └── CassandraYamlParser.kt │ │ ├── metrics │ │ ├── NodeTableReadCount.kt │ │ ├── ParsedExpression.kt │ │ └── jmxMetrics │ │ │ ├── Auth.kt │ │ │ ├── JMXMetric.kt │ │ │ ├── Net.kt │ │ │ ├── Transport.kt │ │ │ ├── Request.kt │ │ │ └── NoMatch.kt │ │ └── utils │ │ ├── OutputSectionCounter.kt │ │ ├── HumanCount.kt │ │ └── MontecristoMustacheFactory.kt ├── settings.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── Dockerfile ├── gradle.properties └── docker-entrypoint.sh ├── dse-stats-converter ├── settings.gradle ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── runConverter.sh ├── gradle.properties └── src │ ├── main │ └── resources │ │ └── logback.xml │ └── test │ └── kotlin │ └── com │ └── datastax │ └── dsestatsconverter │ └── ConvertTest.kt ├── pull ├── env │ └── secrets │ │ └── aws.env.template ├── Dockerfile └── docker-entrypoint.sh ├── decrypt └── Dockerfile ├── docker-compose.yml ├── list ├── Dockerfile └── docker-entrypoint.sh ├── aws-env.sh └── HISTORY.md /old-c-stats-converter/.gradle/6.8.1/gc.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /old-c-stats-converter/.gradle/vcs-1/gc.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /old-c-stats-converter/.gradle/6.8.1/fileChanges/last-build.bin: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /old-c-stats-converter/.gradle/configuration-cache/gc.properties: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/metrics/cloud/aws-az.txt: -------------------------------------------------------------------------------- 1 | us-west-2a -------------------------------------------------------------------------------- /montecristo/src/test/resources/metrics/cloud/aws-instance-type.txt: -------------------------------------------------------------------------------- 1 | t3.small -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/themes/hugo-xmin-master/layouts/partials/foot_custom.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/themes/hugo-xmin-master/layouts/partials/head_custom.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/themes/hugo-xmin-master/layouts/partials/prev_next_links.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/helpers/rowCacheEnabled.yaml: -------------------------------------------------------------------------------- 1 | row_cache_size: 1 2 | key: "value" 3 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/helpers/rowCacheDisabled.yaml: -------------------------------------------------------------------------------- 1 | row_cache_size: 0MiB 2 | key: "value" 3 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/nodetool/gossip/gossipinfo_empty.txt: -------------------------------------------------------------------------------- 1 | 2 | nodetool rc=1 -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/nodetool/info/nodetool_info_empty.txt: -------------------------------------------------------------------------------- 1 | 2 | nodetool rc=1 -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/layouts/shortcodes/pb.html: -------------------------------------------------------------------------------- 1 |

 

2 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/configuration/configuration_snitch.md: -------------------------------------------------------------------------------- 1 | ## Snitch 2 | 3 | {{snitch}} 4 | 5 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/themes/hugo-xmin-master/archetypes/default.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: '' 3 | date: '' 4 | --- 5 | -------------------------------------------------------------------------------- /old-c-stats-converter/.gradle/buildOutputCleanup/cache.properties: -------------------------------------------------------------------------------- 1 | #Mon Jan 23 16:32:45 GMT 2023 2 | gradle.version=6.8.1 3 | -------------------------------------------------------------------------------- /montecristo/settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * This file was generated by the Gradle 'init' task. 3 | */ 4 | 5 | rootProject.name = 'montecristo' -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/infrastructure/infrastructure_disk_space.md: -------------------------------------------------------------------------------- 1 | ## Disk space 2 | 3 | **Discuss disk space** 4 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/layouts/shortcodes/size.html: -------------------------------------------------------------------------------- 1 |
2 | {{ .Inner }} 3 |
4 | -------------------------------------------------------------------------------- /dse-stats-converter/settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * This file was generated by the Gradle 'init' task. 3 | */ 4 | 5 | rootProject.name = 'dse-stats-converter' -------------------------------------------------------------------------------- /montecristo/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastax-labs/Montecristo/HEAD/montecristo/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /montecristo/src/test/resources/metrics/tm1.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastax-labs/Montecristo/HEAD/montecristo/src/test/resources/metrics/tm1.db -------------------------------------------------------------------------------- /montecristo/src/test/resources/helpers/generic.yaml: -------------------------------------------------------------------------------- 1 | # File for testing generic YAML parsing functionality 2 | num_value: 42 3 | string_value: 'The Answer' 4 | -------------------------------------------------------------------------------- /old-c-stats-converter/settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * This file was generated by the Gradle 'init' task. 3 | */ 4 | 5 | rootProject.name = 'old-c-stats-converter' -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/configuration/configuration_memtable_storage.md: -------------------------------------------------------------------------------- 1 | ## Memtable storage 2 | 3 | {{memtableConfigurationSection}} 4 | 5 | -------------------------------------------------------------------------------- /dse-stats-converter/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastax-labs/Montecristo/HEAD/dse-stats-converter/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /old-c-stats-converter/runConverter.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ./gradlew build install -x test 3 | ./build/install/old-c-stats-converter/bin/old-c-stats-converter $@ || exit 1 -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/_index.md: -------------------------------------------------------------------------------- 1 | +++ 2 | title = "The DataStax Discovery Document Contents" 3 | +++ 4 | 5 | # Welcome to DataStax Discovery report! 6 | 7 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/themes/hugo-xmin-master/layouts/404.html: -------------------------------------------------------------------------------- 1 | {{ partial "header.html" . }} 2 | 3 | 404 NOT FOUND 4 | 5 | {{ partial "footer.html" . }} 6 | -------------------------------------------------------------------------------- /old-c-stats-converter/.gradle/checksums/checksums.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastax-labs/Montecristo/HEAD/old-c-stats-converter/.gradle/checksums/checksums.lock -------------------------------------------------------------------------------- /old-c-stats-converter/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastax-labs/Montecristo/HEAD/old-c-stats-converter/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /old-c-stats-converter/.gradle/checksums/sha1-checksums.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastax-labs/Montecristo/HEAD/old-c-stats-converter/.gradle/checksums/sha1-checksums.bin -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/themes/hugo-xmin-master/layouts/shortcodes/svg.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /old-c-stats-converter/.gradle/6.8.1/fileHashes/fileHashes.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastax-labs/Montecristo/HEAD/old-c-stats-converter/.gradle/6.8.1/fileHashes/fileHashes.bin -------------------------------------------------------------------------------- /old-c-stats-converter/.gradle/6.8.1/fileHashes/fileHashes.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastax-labs/Montecristo/HEAD/old-c-stats-converter/.gradle/6.8.1/fileHashes/fileHashes.lock -------------------------------------------------------------------------------- /old-c-stats-converter/.gradle/buildOutputCleanup/outputFiles.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastax-labs/Montecristo/HEAD/old-c-stats-converter/.gradle/buildOutputCleanup/outputFiles.bin -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/operations/operations_tombstones_per_read.md: -------------------------------------------------------------------------------- 1 | ## Tombstones Per Read 2 | 3 | Tombstones per read are a metric tracked per table. 4 | 5 | {{tables}} 6 | 7 | -------------------------------------------------------------------------------- /old-c-stats-converter/.gradle/6.8.1/fileHashes/resourceHashesCache.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastax-labs/Montecristo/HEAD/old-c-stats-converter/.gradle/6.8.1/fileHashes/resourceHashesCache.bin -------------------------------------------------------------------------------- /old-c-stats-converter/.gradle/6.8.1/executionHistory/executionHistory.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastax-labs/Montecristo/HEAD/old-c-stats-converter/.gradle/6.8.1/executionHistory/executionHistory.bin -------------------------------------------------------------------------------- /old-c-stats-converter/.gradle/buildOutputCleanup/buildOutputCleanup.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastax-labs/Montecristo/HEAD/old-c-stats-converter/.gradle/buildOutputCleanup/buildOutputCleanup.lock -------------------------------------------------------------------------------- /old-c-stats-converter/.gradle/6.8.1/executionHistory/executionHistory.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastax-labs/Montecristo/HEAD/old-c-stats-converter/.gradle/6.8.1/executionHistory/executionHistory.lock -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/configuration/configuration_custom_settings.md: -------------------------------------------------------------------------------- 1 | ## Custom settings 2 | 3 | Below are all the settings from the `cassandra.yaml` file that were customized: 4 | 5 | {{table}} 6 | 7 | -------------------------------------------------------------------------------- /pull/env/secrets/aws.env.template: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # you can find your security credentials here: 4 | # https://console.aws.amazon.com/iam/home?#/users 5 | 6 | AWS_ACCESS_KEY_ID= 7 | AWS_SECRET_ACCESS_KEY= 8 | AWS_REGION= 9 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/themes/hugo-xmin-master/static/fonts/Kanit-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastax-labs/Montecristo/HEAD/montecristo/src/main/resources/hugo/themes/hugo-xmin-master/static/fonts/Kanit-Regular.ttf -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/themes/hugo-xmin-master/static/fonts/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastax-labs/Montecristo/HEAD/montecristo/src/main/resources/hugo/themes/hugo-xmin-master/static/fonts/Roboto-Regular.ttf -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/schema/root-schema: -------------------------------------------------------------------------------- 1 | CREATE KEYSPACE testkeyspace1 WITH REPLICATION = { 'class' : 'org.apache.cassandra.locator.NetworkTopologyStrategy', 'DC1': '3', 'DC2': '3' } AND DURABLE_WRITES = true; 2 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/infrastructure/infrastructure_path.md: -------------------------------------------------------------------------------- 1 | ## Path 2 | 3 | The `$PATH` environment variable has the following configuration: 4 | 5 | ``` 6 | {{path-values}} 7 | ``` 8 | 9 | {{path-conclusion}} 10 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/schema/10.0.0.1/schema1: -------------------------------------------------------------------------------- 1 | CREATE KEYSPACE testkeyspace1 WITH REPLICATION = { 'class' : 'org.apache.cassandra.locator.NetworkTopologyStrategy', 'DC1': '3', 'DC2': '3' } AND DURABLE_WRITES = true; 2 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/schema/10.0.0.1/schema2: -------------------------------------------------------------------------------- 1 | CREATE KEYSPACE testkeyspace2 WITH REPLICATION = { 'class' : 'org.apache.cassandra.locator.NetworkTopologyStrategy', 'DC1': '3', 'DC2': '3' } AND DURABLE_WRITES = true; 2 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/schema/10.0.0.2/schema1: -------------------------------------------------------------------------------- 1 | CREATE KEYSPACE testkeyspace1 WITH REPLICATION = { 'class' : 'org.apache.cassandra.locator.NetworkTopologyStrategy', 'DC1': '3', 'DC2': '3' } AND DURABLE_WRITES = true; 2 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/schema/10.0.0.2/schema2: -------------------------------------------------------------------------------- 1 | CREATE KEYSPACE testkeyspace2 WITH REPLICATION = { 'class' : 'org.apache.cassandra.locator.NetworkTopologyStrategy', 'DC1': '3', 'DC2': '3' } AND DURABLE_WRITES = true; 2 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/schema/10.0.0.3/schema1: -------------------------------------------------------------------------------- 1 | CREATE KEYSPACE testkeyspace1 WITH REPLICATION = { 'class' : 'org.apache.cassandra.locator.NetworkTopologyStrategy', 'DC1': '3', 'DC2': '3' } AND DURABLE_WRITES = true; 2 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/schema/10.0.0.3/schema2: -------------------------------------------------------------------------------- 1 | CREATE KEYSPACE testkeyspace2 WITH REPLICATION = { 'class' : 'org.apache.cassandra.locator.NetworkTopologyStrategy', 'DC1': '3', 'DC2': '3' } AND DURABLE_WRITES = true; 2 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/themes/hugo-xmin-master/static/fonts/RobotoMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastax-labs/Montecristo/HEAD/montecristo/src/main/resources/hugo/themes/hugo-xmin-master/static/fonts/RobotoMono-Regular.ttf -------------------------------------------------------------------------------- /montecristo/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /dse-stats-converter/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/sstable-statistics/keyspace1/table1/bb-1-bti-Statistics.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastax-labs/Montecristo/HEAD/montecristo/src/test/resources/fileLoaders/parsers/sstable-statistics/keyspace1/table1/bb-1-bti-Statistics.db -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/sstable-statistics/keyspace1/table1/md-1-big-Statistics.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastax-labs/Montecristo/HEAD/montecristo/src/test/resources/fileLoaders/parsers/sstable-statistics/keyspace1/table1/md-1-big-Statistics.db -------------------------------------------------------------------------------- /old-c-stats-converter/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/themes/hugo-xmin-master/layouts/partials/footer.html: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/sstable-statistics/keyspace1/table2-uuidABCD/bb-1-bti-Statistics.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/datastax-labs/Montecristo/HEAD/montecristo/src/test/resources/fileLoaders/parsers/sstable-statistics/keyspace1/table2-uuidABCD/bb-1-bti-Statistics.db -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/configuration/configuration_trickle_fsync.md: -------------------------------------------------------------------------------- 1 | ## Trickle fsync 2 | 3 | The `trickle_fsync` can be used to provide better performance with SSDs by flushing buffers to disk more frequently, limiting the negative effects of flushing on latencies. 4 | 5 | {{trickle}} 6 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/datamodel/datamodel_tablemetadata_top_tables.md: -------------------------------------------------------------------------------- 1 | ## Table Metadata 2 | 3 | ### Top 10 Tables by Size 4 | 5 | {{topTablesBySize}} 6 | 7 | ### Top 10 Tables by Reads 8 | 9 | {{topTablesByReads}} 10 | 11 | ### Top 10 Tables by Writes 12 | 13 | {{topTablesByWrites}} 14 | 15 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/operations/operations_aborted_hints.md: -------------------------------------------------------------------------------- 1 | ## Aborted Hints 2 | 3 | When the Hinted Handoff system attempts to replay mutations the recipient may still fail to process them. When this happens hints are kept on the coordinator and delivery is retried later. 4 | 5 | {{failedHints}} 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/configuration/configuration_paths.md: -------------------------------------------------------------------------------- 1 | 2 | ## Paths 3 | 4 | {{software}} stores data in SSTables and the commit log, in multiple paths on the server. The paths are controlled by the `data_file_directories` and `commitlog_directory` settings respectively. 5 | 6 | {{paths}} 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/structure/artifacts.md: -------------------------------------------------------------------------------- 1 | # Artifacts 2 | 3 | The artifacts used for this discovery include: 4 | 5 | * {{software}} logs 6 | * {{software}} configuration files 7 | * Output from {{software}} nodetool diagnostics 8 | * Various operating system diagnostics 9 | * Schema 10 | * JMX Metrics 11 | 12 | 13 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/configuration/configuration_java_heap_settings.md: -------------------------------------------------------------------------------- 1 | ## Java Heap and GC Configuration 2 | 3 | The GC in use is : **{{GcAlgorithm}}** 4 | 5 | **Heap size :** {{HeapSize}} 6 | {{#UsesCMS}} 7 | **New Gen :** {{NewGenSize}} 8 | {{/UsesCMS}} 9 | 10 | GC Flags : 11 | 12 | ``` 13 | {{GcSettings}} 14 | ``` 15 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/schema/schema-with-udf.cql: -------------------------------------------------------------------------------- 1 | CREATE KEYSPACE test WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1': '3'} AND durable_writes = true; 2 | 3 | CREATE FUNCTION test.fLog (input double) 4 | CALLED ON NULL INPUT 5 | RETURNS double LANGUAGE java AS 6 | 'return Double.valueOf(Math.log(input.doubleValue()));'; -------------------------------------------------------------------------------- /decrypt/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:jammy-20220421 2 | 3 | RUN apt-get update \ 4 | && apt-get install -y \ 5 | openssl 6 | 7 | ENV WORKDIR /root 8 | WORKDIR $WORKDIR 9 | VOLUME $WORKDIR/artifacts 10 | 11 | COPY docker-entrypoint.sh $WORKDIR/docker-entrypoint.sh 12 | 13 | # must be hardcoded to use $1 correctly in docker-entrypoint.sh 14 | ENTRYPOINT ["/root/docker-entrypoint.sh"] 15 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/configuration/recommendations/version_supported.md: -------------------------------------------------------------------------------- 1 | This cluster is running Cassandra version {{version}}. We recommend upgrading to HCD, or Cassandra version {{recommendedVersion}}. Apache Cassandra only maintains the last three major releases, ensure preparations begin before {{version}} becomes unsupported. We can assist in this process if help is requested. -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/themes/hugo-xmin-master/hugo-xmin.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: knitr 13 | LaTeX: pdfLaTeX 14 | 15 | AutoAppendNewline: Yes 16 | StripTrailingWhitespace: Yes 17 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/themes/hugo-xmin-master/layouts/index.html: -------------------------------------------------------------------------------- 1 | {{ partial "header.html" . }} 2 | 3 | {{if not .IsHome }} 4 |

{{ .Title }}

5 | {{ end }} 6 | 7 | {{ .Content }} 8 | 9 | 15 | 16 | {{ partial "footer.html" . }} 17 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/configuration/recommendations/version_unsupported.md: -------------------------------------------------------------------------------- 1 | This cluster is running Cassandra unsupported version {{version}}. We recommend upgrading to HCD, or Cassandra {{recommendedVersion}}, keeping in mind you must upgrade first to each adjacent major version up to 5.0, and can only skip one adjacent major version after 5.0. We can assist in this process if help is requested. -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/security/security_network_encryption.md: -------------------------------------------------------------------------------- 1 | ## Network encryption 2 | 3 | {{software}} supports SSL encryption for both client-to-server and server-to-server communications. The server-to-server communications can be configured to encrypt cross Data Center messages only or all messages. Encryption is controlled by many configuration settings. 4 | 5 | {{encryption}} 6 | 7 | 8 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/executionProfile/executionProfile.yaml: -------------------------------------------------------------------------------- 1 | 2 | # Limits to apply to report generation 3 | limits: 4 | # Number of days of log entries to include within a search of the logs 5 | numberOfLogDays: 90 6 | 7 | # Aggregation Warnings to check for 8 | aggregationWarnings: 1000000 9 | 10 | # Number of prepared statements discarded to check for 11 | preparedStatementWarnings: 1000000 -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | 2 | services: 3 | # MICROSERVICES 4 | 5 | list: 6 | build: list 7 | env_file: 8 | - pull/env/secrets/aws.env 9 | 10 | pull: 11 | build: pull 12 | command: TICKET-123 13 | env_file: 14 | - pull/env/secrets/aws.env 15 | volumes: 16 | - ${ARTIFACTS_DIR}:/root/artifacts 17 | 18 | decrypt: 19 | build: decrypt 20 | volumes: 21 | - ${ARTIFACTS_DIR}:/root/artifacts 22 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/operations/operations_table_partition_balance.md: -------------------------------------------------------------------------------- 1 | ## Data Distribution 2 | 3 | The 3 largest tables have been analysed to check the data distribution of these tables across the nodes in each DC, the number of partitions and percentage of the total that they make up. 4 | 5 | ### {{1_name}} 6 | 7 | {{1_table}} 8 | 9 | ### {{2_name}} 10 | 11 | {{2_table}} 12 | 13 | ### {{3_name}} 14 | 15 | {{3_table}} 16 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/themes/hugo-xmin-master/layouts/_default/terms.html: -------------------------------------------------------------------------------- 1 | {{ partial "header.html" . }} 2 | 3 |

{{ .Title }}

4 | 5 | 15 | 16 | {{ partial "footer.html" . }} 17 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/themes/hugo-xmin-master/layouts/_default/list.html: -------------------------------------------------------------------------------- 1 | {{ partial "header.html" . }} 2 | 3 | {{if not .IsHome }} 4 |

{{ .Title }}

5 | {{ end }} 6 | 7 | {{ .Content }} 8 | 9 | 19 | 20 | {{ partial "footer.html" . }} 21 | -------------------------------------------------------------------------------- /list/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:jammy-20220421 2 | 3 | RUN apt-get update 4 | 5 | RUN DEBIAN_FRONTEND=noninteractive \ 6 | apt-get install -y \ 7 | groff \ 8 | python3-dev \ 9 | python3-pip \ 10 | unzip 11 | 12 | RUN pip install --upgrade awscli pip 13 | 14 | ENV WORKDIR /root 15 | WORKDIR $WORKDIR 16 | 17 | COPY .aws/credentials $WORKDIR/.aws/credentials 18 | COPY docker-entrypoint.sh $WORKDIR/docker-entrypoint.sh 19 | 20 | ENTRYPOINT ["/root/docker-entrypoint.sh"] 21 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/configuration/configuration_configuration_mismatches.md: -------------------------------------------------------------------------------- 1 | ## Configuration Mismatches 2 | 3 | The node : {{referenceNode}} has been used as a reference, the table below shows the nodes with settings that are different to the reference node chosen. 4 | 5 | {{configMismatches}} 6 | 7 | ## Configuration Missing / Additional 8 | 9 | The table below shows where nodes have got additional or setting missing when compared to the reference node. 10 | 11 | {{configMissing}} -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/datamodel/datamodel_gc_grace_seconds.md: -------------------------------------------------------------------------------- 1 | ## GC grace seconds 2 | 3 | GC Grace Seconds is used by {{software}} to control when tombstones (deletion markers) can be purged from disk and when they should no longer be replicated in repair. It is controlled by the table property `gc_grace_seconds`. 4 | 5 | The default setting is 864000 (10 days). When using the default, operators are required to run a repair at least every 10 days. 6 | 7 | 8 | {{gc_grace_values}} 9 | 10 | 11 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/infrastructure/infrastructure_java_version.md: -------------------------------------------------------------------------------- 1 | ## Java 2 | 3 | The Java version in use is {{java-version}}: 4 | 5 | ``` 6 | {{java-version-output}} 7 | ``` 8 | 9 | Cassandra versions 4.x should be using Java 11. 10 | Cassandra versions 5.x should using Java 17. 11 | 12 | --- 13 | 14 | _**Noted for reference**: Always upgrade to the latest minor release of the Java in order to get the latest fixes and improvements, especially regarding garbage collection._ 15 | 16 | --- 17 | -------------------------------------------------------------------------------- /montecristo/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:jammy-20220421 2 | 3 | ENV WORKDIR /root 4 | WORKDIR $WORKDIR 5 | 6 | RUN apt-get update 7 | 8 | RUN DEBIAN_FRONTEND=noninteractive \ 9 | apt-get install -y \ 10 | default-jdk \ 11 | maven \ 12 | vim 13 | 14 | COPY ./src $WORKDIR/montecristo/src 15 | COPY pom.xml $WORKDIR/montecristo/pom.xml 16 | 17 | WORKDIR montecristo 18 | RUN mvn clean package 19 | WORKDIR $WORKDIR 20 | 21 | COPY docker-entrypoint.sh $WORKDIR 22 | ENTRYPOINT ["/root/docker-entrypoint.sh"] 23 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/infrastructure/infrastructure_swap.md: -------------------------------------------------------------------------------- 1 | ## Swap 2 | 3 | Swap is used when RAM is full. Generally speaking, {{software}} performs poorly when using swap space. 4 | 5 | {{^swapReport.isEmpty}} 6 | The nodes in this cluster are using different configuration settings. This is a full breakdown of the configuration settings: 7 | 8 | {{swapReport}} 9 | 10 | {{/swapReport.isEmpty}} 11 | {{#swapReport.isEmpty}} 12 | No swap files were detected on the nodes. 13 | {{/swapReport.isEmpty}} 14 | 15 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/themes/hugo-xmin-master/theme.toml: -------------------------------------------------------------------------------- 1 | name = "XMin" 2 | license = "MIT" 3 | licenselink = "https://github.com/yihui/hugo-xmin/blob/master/LICENSE.md" 4 | description = "eXtremely Minimal Hugo theme: about 150 lines of code in total, including HTML and CSS" 5 | homepage = "https://xmin.yihui.name" 6 | tags = ["minimal", "blog", "personal", "clean", "simple", "starter", "minimalist"] 7 | features = ["blog"] 8 | min_version = "0.18" 9 | 10 | [author] 11 | name = "Yihui Xie" 12 | homepage = "https://yihui.name" 13 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/themes/hugo-xmin-master/layouts/_default/single.html: -------------------------------------------------------------------------------- 1 | {{ partial "header.html" . }} 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | {{ .Content }} 12 |
13 | 14 | {{ partial "prev_next_links.html" . }} 15 | 16 | {{ partial "footer.html" . }} 17 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/infrastructure/infrastructure_osconfig_overview.md: -------------------------------------------------------------------------------- 1 | ## Operating System Configuration 2 | 3 | ### Limits and Configuration 4 | 5 | To operate {{software}} efficiently on the Linux platform, we recommend that administrators should alter a range of operating system settings. These settings are normally stored in sysctl, but can also be present in the form of limits or other configuration items. 6 | 7 | More details on the recommended values can be found here : {{recommendedSettingsLink}} 8 | 9 | {{resultTable}} 10 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/os/blockdev-report.txt: -------------------------------------------------------------------------------- 1 | RO RA SSZ BSZ StartSec Size Device 2 | rw 8192 512 4096 0 343597383680 /dev/sda 3 | rw 8192 512 512 2048 1073741824 /dev/sda1 4 | rw 8192 512 4096 2099200 127774228480 /dev/sda2 5 | rw 8192 512 4096 251658240 214748364800 /dev/sda3 6 | rw 256 2048 4096 0 962592768 /dev/sr0 7 | rw 8192 512 512 0 329630351360 /dev/dm-0 8 | rw 8192 512 4096 0 12884901888 /dev/dm-1 9 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/datamodel/datamodel_sstable_count.md: -------------------------------------------------------------------------------- 1 | ## SSTable Counts 2 | 3 | The number of SSTables on a node for a given database table will vary based on a number of factors such as compaction strategy settings, data model, data sizes etc. 4 | 5 | When a table is using Size Tiered Compaction Strategy (STCS) it is more sensitive to an excessive number of SSTables - it degrades read performance, causes heap pressure and creates performance issues with the IO Caches. 6 | 7 | ### High STCS SSTable Counts 8 | 9 | {{sstablecounts}} 10 | 11 | -------------------------------------------------------------------------------- /pull/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:jammy-20220421 2 | 3 | RUN apt-get update 4 | 5 | RUN DEBIAN_FRONTEND=noninteractive \ 6 | apt-get install -y \ 7 | groff \ 8 | python3 \ 9 | python3-pip \ 10 | unzip 11 | 12 | RUN pip install --upgrade awscli pip 13 | 14 | ENV WORKDIR /root 15 | WORKDIR $WORKDIR 16 | VOLUME $WORKDIR/artifacts 17 | 18 | COPY env/secrets/aws.env $WORKDIR/.aws/credentials 19 | COPY docker-entrypoint.sh $WORKDIR/docker-entrypoint.sh 20 | 21 | # must be hardcoded to use $1 correctly in docker-entrypoint.sh 22 | ENTRYPOINT ["/root/docker-entrypoint.sh"] 23 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/themes/hugo-xmin-master/static/fonts/fonts.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Kanit'; 3 | src: url('Kanit-Regular.ttf') format('truetype'); 4 | font-weight: normal; 5 | font-style: normal; 6 | } 7 | 8 | @font-face { 9 | font-family: 'Roboto'; 10 | src: url('Roboto-Regular.ttf') format('truetype'); 11 | font-weight: normal; 12 | font-style: normal; 13 | } 14 | 15 | @font-face { 16 | font-family: 'Roboto Mono'; 17 | src: url('RobotoMono-Regular.ttf') format('truetype'); 18 | font-weight: normal; 19 | font-style: normal; 20 | } -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/configuration/configuration_seeds.md: -------------------------------------------------------------------------------- 1 | ## Seeds 2 | 3 | Seeds are used as "well known" nodes in the cluster. When a new node starts, it uses the seed list to find the other nodes in the cluster. They also function as "super nodes" in the Gossip protocol, where they receive gossip updates more frequently than other nodes. The list of seeds nodes is configured using the "seeds" configuration setting. 4 | 5 | The recommended approach is to use the same seed list for all nodes in a cluster and for it to contain three nodes from each DC. 6 | 7 | {{seedConfiguration}} 8 | 9 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/infrastructure/infrastructure_storage.md: -------------------------------------------------------------------------------- 1 | ## Storage 2 | 3 | {{software}} has two distinct locations that can be configured for storage of data and commit log. Each device can have a different scheduler and read ahead configured. 4 | 5 | Read ahead is designed for slower spinning disks where latency is the limiting factor. By reading extra information into the page cache, read ahead trades off some throughput for an improvement in latency. We set the read ahead quite low (16KB). 6 | 7 | The storage devices for the data are configured as follows: 8 | 9 | {{storage}} 10 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/configuration/configuration_logging.md: -------------------------------------------------------------------------------- 1 | ## Logging 2 | 3 | By default {{software}} is configured to log to both a rolling file typically at /var/log/cassandra/system.log and standard out (for the process) at the same time. Depending on how Cassandra is started, logging to standard out may be directed to a file that will grow indefinitely without any management of its size. In addition, writing logs to file and to STDOUT will take additional time as the same message is being written twice. 4 | 5 | Logging is using the following settings: 6 | 7 | ``` 8 | {{loggingConfig}} 9 | ``` 10 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/nodetool/describeCluster.txt: -------------------------------------------------------------------------------- 1 | Cluster Information: 2 | Name: TestClusterName 3 | Snitch: org.apache.cassandra.locator.GossipingPropertyFileSnitch 4 | DynamicEndPointSnitch: enabled 5 | Partitioner: org.apache.cassandra.dht.Murmur3Partitioner 6 | Schema versions: 7 | a865f80d-aac8-30c3-9519-74826adba113: [10.147.196.115, 10.147.196.114, 10.147.196.113, 10.147.196.112, 10.147.196.116, 10.227.196.11, 10.227.196.15, 10.227.196.14, 10.227.196.13, 10.227.196.12, 10.227.196.19, 10.227.196.18, 10.227.196.17, 10.227.196.16, 10.227.196.22, 10.227.196.21, 10.227.196.20, 10.147.196.111] 8 | 9 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/datamodel/datamodel_replication.md: -------------------------------------------------------------------------------- 1 | ## Replication strategy 2 | 3 | 4 | * **SimpleStrategy**: A basic replication strategy which places replicas by moving around the ring. Does not take into account racks or data centers. This should never be used in production, it is always wrong. 5 | * **NetworkTopologyStrategy**: This strategy adds to simple strategy by enabling rack awareness and DC awareness. This is the correct strategy to use in production. 6 | 7 | {{keyspaces}} 8 | 9 | {{#keyspacesToSwitch.empty}} 10 | We have no recommendations at this time. 11 | {{/keyspacesToSwitch.empty}} 12 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/operations/operations_log_analysis_durations.md: -------------------------------------------------------------------------------- 1 | ## Log Analysis Durations 2 | 3 | The following sections are based on analysis of the submitted {{software}} log files, each node can have a different duration of log history and this should be taken into consideration when understanding the frequency and durations of the warnings. 4 | 5 | {{nodeLogDuration}} 6 | 7 | {{#logTruncationInEffect}} 8 | 9 | --- 10 | 11 | _**Noted for reference:** More than {{daysToInclude}} days of logs have been found, only the most recent {{daysToInclude}} days have been included in the analysis._ 12 | 13 | --- 14 | {{/logTruncationInEffect}} -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/operations/operations_dropped_hints.md: -------------------------------------------------------------------------------- 1 | ## Dropped Hints 2 | 3 | The Hinted Handoff system only stores hints if a node has been down for less than `max_hint_window_in_ms` which defaults to 10800000 or 3 hours. When nodes are down for longer than the timeout, hints are no longer collected and the node will not receive missed writes. When the down node returns it will not receive hints for writes that occurred after the `max_hint_window_in_ms` expired. 4 | 5 | Total Dropped Hints: {{totalDropped}} 6 | 7 | {{^droppedReport.isEmpty}} 8 | Dropped Hints by Node: 9 | 10 | {{droppedReport}} 11 | {{/droppedReport.isEmpty}} 12 | 13 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/configuration/configuration_streaming.md: -------------------------------------------------------------------------------- 1 | ## Streaming 2 | 3 | Streaming is the process {{software}} uses during repair, rebuild and bootstrapping to transfer sections of SSTables between nodes. Large chunks of files can be efficiently streamed between nodes, avoiding the read and write API. There are several settings that control streaming in the configuration. 4 | 5 | The `streaming_socket_timeout_in_ms` setting specifies how long to wait before timing out. The default in versions 1.2 and 2.0 in use is 0, which disables the timeout. With this in place nodes must be restarted to clear failed streaming sessions. 6 | 7 | {{streaming}} 8 | 9 | -------------------------------------------------------------------------------- /aws-env.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright DataStax, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | export COLLECTOR_S3_BUCKET= -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/astra/astra_guardrails.md: -------------------------------------------------------------------------------- 1 | ## Guard Rail Checks 2 | 3 | DataStax Astra sets limits for databases to ensure good practices, foster availability and promote optimal configurations for the database. 4 | 5 | This table shows these limits and whether the database is currently within them. The full details of the limits are available on the DataStax website : https://docs.datastax.com/en/astra/docs/datastax-astra-database-limits.html 6 | 7 | ### Common Checks 8 | 9 | {{astraCommon}} 10 | 11 | ### Astra Serverless 12 | 13 | {{astraServerless}} 14 | 15 | ### Astra Classic 16 | 17 | {{astraClassic}} 18 | 19 | ### Astra DB for DSE 20 | 21 | {{astraDSE}} -------------------------------------------------------------------------------- /montecristo/src/main/resources/mkhugozip.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright DataStax, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | cd hugo 16 | zip -r ../hugo.zip * 17 | 18 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/configuration/configuration_address_bindings.md: -------------------------------------------------------------------------------- 1 | ## Address Bindings 2 | 3 | {{software}} binds to two interfaces, and advertises three addresses to other nodes and clients. The two bound interfaces are used to communicate with other nodes and to communicate to clients. The third address that is advertised to other nodes is a "Broadcast Address" and is used when the node is behind a NAT. Communications are configured as follows: 4 | 5 | * Internode (node-to-node) is configured using the `listen_address`. 6 | * Client (client-to-node) is configured using the `rpc_address`. 7 | * Broadcast address is configured using the `broadcast_address`. 8 | 9 | {{address-bindings}} 10 | 11 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/infrastructure/infrastructure_ntp.md: -------------------------------------------------------------------------------- 1 | ## NTP 2 | 3 | The NTP service ensures all nodes within the {{software}} ring always have their clocks synced to allow for reliable timestamp resolution. 4 | 5 | When using a driver for {{software}} that supports CQL 3.0+, the new default is to have client applications generate client-side timestamps to be used for mutation resolution. Because of this change in functionality, it is recommended to have NTP installed on all client nodes that issue mutation requests as well as all {{software}} nodes. 6 | 7 | 8 | ``` 9 | {{ntp}} 10 | ``` 11 | 12 | --- 13 | 14 | _**Noted For Reference:** The NTP offset should be inside (-10, 10) ms interval._ 15 | 16 | --- 17 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/operations/operations_jvm_gc_stats.md: -------------------------------------------------------------------------------- 1 | ## JVM Garbage Collection 2 | 3 | There are two valid options for garbage collection with {{software}}: 4 | 5 | * **Par New + CMS**: The default garbage collector algorithms. They can be optimized for low latency and high throughput but require a deep understanding of them and can be tricky to tune. 6 | * **G1GC**: A collector optimized for high throughput, with minimal configuration, but typically displays higher latencies. 7 | 8 |
9 | 10 | The overall distribution of pause times is as follows: 11 | 12 | {{sortedDistributionTable}} 13 | 14 |
15 | 16 | Pause times by day, broken down by time spent: 17 | 18 | {{gcPauseTimesByDay}} 19 | 20 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/configuration/configuration_compaction.md: -------------------------------------------------------------------------------- 1 | ## Compaction 2 | 3 | The `concurrent_compactors` setting specifies how many compaction tasks may run in parallel. The default number in versions 1.2 and 2.0 uses the number of cores in the system. As of version 2.1 the default is the lower value of number of cores or number of disks. If set too high, this setting can result in premature tenuring in the JVM, as the compaction tasks are throttled by the `compaction_throughput` (or `compaction_throughput_mb_per_sec` in versions before 4.1). 4 | 5 | {{compactionSettings}} 6 | 7 | 8 | --- 9 | 10 | _**Noted for reference**: The compaction throughput is the total throughput shared between the compaction threads._ 11 | 12 | --- 13 | 14 | -------------------------------------------------------------------------------- /dse-stats-converter/runConverter.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Copyright DataStax, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | ./gradlew build install -x test 17 | 18 | ./build/install/dse-stats-converter/bin/dse-stats-converter $@ || exit 1 -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/configuration/configuration_node_communications.md: -------------------------------------------------------------------------------- 1 | ## Node Communications 2 | 3 | Nodes communicate with each other via two connections to every other node. The Command channel is used to send request messages, and the acknowledgement channel is used to send replies. Message passing between nodes is configured by several settings. 4 | 5 | The `inter_dc_tcp_nodelay` setting enables and disables the Nagle algorithm when communicating across data centers. By default `inter_dc_tcp_nodelay` is disabled, which enables the Nagle algorithm and reduces the amount of packets sent across the WAN. This is the correct setting to use when data centers are separated by a large lag, or unreliable networks such as the public internet. 6 | 7 | 8 | {{nagleSetting}} 9 | -------------------------------------------------------------------------------- /montecristo/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | #org.gradle.jvmargs=-Xms16g 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/ConfigSource.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model 18 | 19 | enum class ConfigSource { 20 | CASS, DSE 21 | } -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/infrastructure/infrastructure_overview.md: -------------------------------------------------------------------------------- 1 | ## General Overview 2 | 3 | [CUSTOMER-NAME] is running cluster `{{clusterName}}` on [CLOUD-OR-ONPREM] 4 | 5 | The [CLUSTER-NAME] cluster is used for [CLUSTER-USAGE-DESCRIPTION] 6 | 7 | It contains the following nodes: 8 | 9 | {{infra}} 10 | 11 | {{#showAWS}} 12 | 13 | ## AWS Usage 14 | 15 | ### Instances By Availability Zone and Region 16 | 17 | Within each region there are multiple availability zones. We recommend spreading nodes in a cluster evenly across AZs in order to avoid downtime. Additionally, we recommend using a consistent image size, AMI, and configuration for machines within a given DC to ensure consistent performance and minimize operational overhead. 18 | 19 | {{awsInstances}} 20 | 21 | {{/showAWS}} 22 | 23 | 24 | -------------------------------------------------------------------------------- /dse-stats-converter/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | #org.gradle.jvmargs=-Xms16g 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/commands/BaseCommand.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.commands 18 | 19 | interface BaseCommand { 20 | fun execute() 21 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/LoadError.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model 18 | 19 | data class LoadError (val node : String, val error : String) -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/os/Env.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.os 18 | 19 | data class Env (val data : List, val path : String) -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/logs/LogEntryGroupings.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.logs 18 | 19 | enum class LogEntryGroupings { LEVEL, DATE, MESSAGE } 20 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/os/DStat/DStat.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.os.DStat 18 | 19 | data class DStat(val data : List) 20 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/schema/Caching.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.schema 18 | 19 | data class Caching(val keys: String, val rows: String) -------------------------------------------------------------------------------- /old-c-stats-converter/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | #org.gradle.jvmargs=-Xms16g 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/Workload.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model 18 | 19 | enum class Workload { 20 | CASSANDRA, SEARCH, ANALYTICS, GRAPH 21 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/storage/Fstab.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.storage 18 | 19 | data class Fstab (val data : List, val path : String) -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/storage/Blockdev.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.storage 18 | 19 | data class Blockdev (val data : List, val path : String) -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/nodetool/TpStats.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.nodetool 18 | 19 | data class TpStats (val data : List, val path : String) 20 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/storage/LsBlk.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.storage 18 | 19 | data class LsBlk(val fsType : String, val isRotational : Boolean) 20 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/storage/DiskDevice.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.storage 18 | 19 | data class DiskDevice (val readAhead : Long?, val scheduler : String) 20 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/datamodel/datamodel_materialized_views.md: -------------------------------------------------------------------------------- 1 | ## Materialized Views 2 | 3 | Materialized Views were added in Cassandra 3.0 but have not yet reached a point of stability, and have recently been marked as experimental. They have numerous issues related to data integrity and lack tooling to validate or repair the data in the view against the base table. 4 | 5 | Materialized views also have a tendency to result in extremely large partitions if not very carefully planned out. They must be approached with the same data modeling best practices as any other table. 6 | 7 | Nodes down longer than the hint window can result in data becoming out of sync, and repairing materialized views takes orders of magnitude longer than repairing a normal table. 8 | 9 | We do not recommend using materialized views at this time. 10 | 11 | {{mvtable}} -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/os/Ntp.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.os 18 | 19 | data class Ntp (val server : String, val poll : Int?, val offset : Double?, val jitter : Double?) -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/os/GCAlgorithm.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.os 18 | 19 | enum class GCAlgorithm { 20 | PARNEW, 21 | CMS, 22 | G1GC, 23 | UNKNOWN 24 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/sections/structure/RecommendationPriority.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.sections.structure 18 | 19 | enum class RecommendationPriority { IMMEDIATE, NEAR, LONG } 20 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/nodetool/status/nodetool_status.txt: -------------------------------------------------------------------------------- 1 | Datacenter: DC1 2 | =============== 3 | Status=Up/Down 4 | |/ State=Normal/Leaving/Joining/Moving 5 | -- Address Load Tokens Owns Host ID Rack 6 | UN 10.220.40.157 7.59 TB 256 ? 71d763ea-f0e6-4ac4-b78c-ba70a41decb3 22 7 | UN 10.220.40.26 8.46 GB 256 ? f8cfe2cd-e8b5-43d7-8b3b-36187a267ae3 11 8 | UN 10.220.40.135 7.08 MB 256 ? 06eda88f-274c-4c6b-9ef7-887727cf40a0 21 9 | UN 10.220.40.80 7.42 KB 256 ? 534dbb94-c3ed-4781-ac4d-586e1c2e910e 13 10 | UN 10.220.40.210 10.5 PB 256 ? 689c1394-329a-4b54-85fb-2ee25117cd29 23 11 | 12 | Note: Non-system keyspaces don't have the same replication settings, effective ownership information is meaningless 13 | 14 | nodetool rc=0 15 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/logs/LogSettings.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.logs 18 | 19 | data class LogSettings (val appenders : List , val rawLogBackSettings : List) 20 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/configuration/configuration_thread_pools.md: -------------------------------------------------------------------------------- 1 | ## Thread Pools 2 | 3 | Cassandra uses a [Staged Event Driven Architecture](https://en.wikipedia.org/wiki/Staged_event-driven_architecture) that uses thread pools for common tasks. The read and the write paths have their own thread pools, where the number of threads can be controlled through configuration. Typically the number of threads is increased to put more pressure on the storage system and allow it to re-order commands in the most efficient way possible. The size of the read and write thread pools are controlled by the `concurrent_reads`, `concurrent_writes` `concurrent_counter_writes`, `concurrent_batchlog_writes` and `concurrent_materialized_view_writes` configuration settings. 4 | 5 | 6 | {{concurrentReads}} 7 | 8 | {{concurrentWrites}} 9 | 10 | {{concurrentCounterWrites}} 11 | 12 | 13 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/nodetool/status/single_dc_16_vnodes_all_UN.txt: -------------------------------------------------------------------------------- 1 | Datacenter: ld6 2 | =============== 3 | Status=Up/Down 4 | |/ State=Normal/Leaving/Joining/Moving 5 | -- Address Load Tokens Owns Host ID Rack 6 | UN 10.220.40.157 7.59 TB 16 ? 71d763ea-f0e6-4ac4-b78c-ba70a41decb3 22 7 | UN 10.220.40.26 8.46 TB 16 ? f8cfe2cd-e8b5-43d7-8b3b-36187a267ae3 11 8 | UN 10.220.40.135 7.08 TB 16 ? 06eda88f-274c-4c6b-9ef7-887727cf40a0 21 9 | UN 10.220.40.80 7.42 TB 16 ? 534dbb94-c3ed-4781-ac4d-586e1c2e910e 13 10 | UN 10.220.40.210 10.5 TB 16 ? 689c1394-329a-4b54-85fb-2ee25117cd29 23 11 | 12 | Note: Non-system keyspaces don't have the same replication settings, effective ownership information is meaningless 13 | 14 | nodetool rc=0 15 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/nodetool/status/single_dc_256_vnodes_all_UN.txt: -------------------------------------------------------------------------------- 1 | Datacenter: ld6 2 | =============== 3 | Status=Up/Down 4 | |/ State=Normal/Leaving/Joining/Moving 5 | -- Address Load Tokens Owns Host ID Rack 6 | UN 10.220.40.157 7.59 TB 256 ? 71d763ea-f0e6-4ac4-b78c-ba70a41decb3 22 7 | UN 10.220.40.26 8.46 TB 256 ? f8cfe2cd-e8b5-43d7-8b3b-36187a267ae3 11 8 | UN 10.220.40.135 7.08 TB 256 ? 06eda88f-274c-4c6b-9ef7-887727cf40a0 21 9 | UN 10.220.40.80 7.42 TB 256 ? 534dbb94-c3ed-4781-ac4d-586e1c2e910e 13 10 | UN 10.220.40.210 10.5 TB 256 ? 689c1394-329a-4b54-85fb-2ee25117cd29 23 11 | 12 | Note: Non-system keyspaces don't have the same replication settings, effective ownership information is meaningless 13 | 14 | nodetool rc=0 15 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/nodetool/status/single_dc_64_vnodes_all_UN.txt: -------------------------------------------------------------------------------- 1 | Datacenter: ld6 2 | =============== 3 | Status=Up/Down 4 | |/ State=Normal/Leaving/Joining/Moving 5 | -- Address Load Tokens Owns Host ID Rack 6 | UN 10.220.40.157 7.59 TB 64 ? 71d763ea-f0e6-4ac4-b78c-ba70a41decb3 22 7 | UN 10.220.40.26 8.46 TB 64 ? f8cfe2cd-e8b5-43d7-8b3b-36187a267ae3 11 8 | UN 10.220.40.135 7.08 TB 64 ? 06eda88f-274c-4c6b-9ef7-887727cf40a0 21 9 | UN 10.220.40.80 7.42 TB 64 ? 534dbb94-c3ed-4781-ac4d-586e1c2e910e 13 10 | UN 10.220.40.210 10.5 TB 64 ? 689c1394-329a-4b54-85fb-2ee25117cd29 23 11 | 12 | Note: Non-system keyspaces don't have the same replication settings, effective ownership information is meaningless 13 | 14 | nodetool rc=0 15 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/fileLoaders/parsers/IFileParser.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.fileLoaders.parsers 18 | 19 | interface IFileParser { 20 | 21 | fun parse(data : List) : T 22 | 23 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/metrics/SSTableCount.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.metrics 18 | 19 | data class SSTableCount(val node : String, val keyspace : String, val tableName : String, val tableCount: Int) -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/metrics/NodeTableReadCount.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.metrics 18 | 19 | data class NodeTableReadCount(val node : String, val keyspace : String , val tableName : String, val readCount : Long ) -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/schema/UserDefinedType.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.schema 18 | 19 | data class UserDefinedType(val name : String, val fields : Map, val rawStatement : String) 20 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/metrics/Server.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.metrics 18 | 19 | data class Server(val host: String, val memoryInGB: Int, val aws_region: String, val aws_instance_type: String, val hasJmx : Boolean) 20 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/logs/LogLevel.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.logs 18 | 19 | // This enum is ordered according to log level, to allow <, > comparisons. Do not re-order it. 20 | enum class LogLevel{ TRACE,DEBUG,INFO,WARN,ERROR } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/os/IfConfig.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.os 18 | 19 | data class IfConfig(val bindings: Map) { 20 | 21 | fun get(name: String): String? { 22 | return bindings[name] 23 | } 24 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/schema/Partitioner.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.schema 18 | 19 | enum class Partitioner(val yamlSetting : String) { 20 | RANDOM("org.apache.cassandra.dht.RandomPartitioner"), 21 | MURMUR("org.apache.cassandra.dht.Murmur3Partitioner") 22 | } 23 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/themes/hugo-xmin-master/layouts/partials/header.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{ if .Title }} 7 | {{ .Title }} 8 | {{ else }} 9 | Discovery Document Section: {{ substr (delimit (split .File.TranslationBaseName "_") " ") 4 }} 10 | {{ end }} 11 | 12 | 13 | 14 | {{ partial "head_custom.html" . }} 15 | 16 | 17 | 18 | 19 | {{ if or (not (isset .Params "show_discovery_banner")) (.Params.show_discovery_banner) }} 20 |
21 | Discovery Findings 22 |
23 | {{ end }} 24 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/datamodel/datamodel_ops_center.md: -------------------------------------------------------------------------------- 1 | ## OpsCenter 2 | 3 | DataStax OpsCenter is an easy-to-use visual management and monitoring solution for DataStax Enterprise (DSE), the always-on data layer for real-time applications. With OpsCenter, you can quickly provision, upgrade, monitor, backup/restore, and manage your DSE clusters with little to no expertise. 4 | 5 | OpsCenter itself uses DataStax Enterprise to store the telemetry data and aggregated data that is used by the web interface. 6 | 7 | OpsCenter should be configured to store the metric data in a different cluster to the one it is monitoring - if stored on the same cluster it contends for I/O and other resources. 8 | 9 | https://docs.datastax.com/en/opscenter/6.8/opsc/configure/opscStoringCollectionDataDifferentCluster_t.html 10 | 11 | The creation of a DSE Enterprise cluster purely for the purpose of storing OpsCenter metric data does not require additional DSE licenses. 12 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/application/JvmSettings.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.application 18 | 19 | import com.datastax.montecristo.model.os.GCAlgorithm 20 | 21 | data class JvmSettings(val gcAlgorithm: GCAlgorithm, val heapSize: Long, val newGenSize: Long, val gcFlags: List) -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/sections/structure/RecommendationType.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.sections.structure 18 | 19 | enum class RecommendationType { 20 | INFRASTRUCTURE, 21 | CONFIGURATION, 22 | SECURITY, 23 | DATAMODEL, 24 | OPERATIONS, 25 | UNCLASSIFIED 26 | } 27 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/operations/operations_blocked_flush_writers.md: -------------------------------------------------------------------------------- 1 | ## Blocked flush writers 2 | 3 | The Flush Writer thread pool is used to write Memtables to disk to create SSTables. When the queue for the thread pool is full, mutation threads (used for writes) will block until the disk activity has caught up. This will cause write latency to spike, as Coordinators will still be accepting mutations and sending messages to nodes. 4 | 5 | 6 | {{blockedFlushWritersSetting}} 7 | 8 | 9 | Blocked flush writers may occur due to: 10 | 11 | - Disk IO not keeping up with requirements. 12 | - Incorrect configuration of the flush system. 13 | - Data model edge cases where multiple Tables must flush at the same time due to commit log segment recycling. 14 | - Use of nodetool flush or nodetool snapshot requiring multiple tables to flush at the same time. 15 | - Blocked flush writers are found using the nodetool tpstats tool. 16 | 17 | 18 | {{blockedTable}} 19 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/logs/IndexWriterStatistics.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.logs 18 | 19 | import java.time.LocalDateTime 20 | 21 | data class IndexWriterStatistics(val minDate : LocalDateTime, val maxDate : LocalDateTime, val validEntries : Int, val invalidEntries : Int) 22 | 23 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/operations/operations_hinted_handoff_tasks.md: -------------------------------------------------------------------------------- 1 | ## Hinted Handoff Tasks 2 | 3 | When a node is unreachable from a coordinator, a hint file is created on disk. Hinted handoff tasks will replay those files and remove them from disk once the hint has been replayed. 4 | This is an optimization to avoid needing to run a repair whenever a node is down. Excessive hints can lead to poor cluster performance. 5 | 6 | ### Live Hints 7 | The TP stats shows how many hints are replaying and how many have completed. These values reset if a node has been restarted 8 | 9 | {{liveHints}} 10 | 11 | ### Log Hint Dispatcher Message Metrics 12 | The logs contain an entry for each time that a hint file has been dispatched to a node, due to the log file durations, this can be greater or less than the JMX metrics. 13 | 14 | {{logHints}} 15 | 16 | {{#hitMessageLimit}} 17 | We found more than 1,000,000 log messages of hint dispatching within the logs. 18 | {{/hitMessageLimit}} -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/os/TransparentHugePageDefrag.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.os 18 | 19 | data class TransparentHugePageDefrag(val data : List, val path : String) { 20 | 21 | fun isSetNever() : Boolean { 22 | return (data.firstOrNull()?:"").contains("never") 23 | } 24 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/nodetool/Ring.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.nodetool 18 | 19 | import java.math.BigInteger 20 | 21 | 22 | data class Ring(val datacenter: String, val nodes: MutableMap> = HashMap()) 23 | 24 | 25 | data class Tokens(val startRange: BigInteger, 26 | val endRange: BigInteger) 27 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/nodetool/gossip/gossip_info_dse_alternative.txt: -------------------------------------------------------------------------------- 1 | /10.163.71.160 2 | generation:1620340026 3 | heartbeat:444554 4 | STATUS:49443:NORMAL,-6589512563423659973 5 | LOAD:444531:5.14654529324E11 6 | SCHEMA:170220:5fb19da1-46d2-36b3-a454-6cef17c9dd83 7 | DC:15:Cassandra 8 | RACK:17:rack3 9 | RELEASE_VERSION:4:4.0.0.677 10 | INTERNAL_IP:13:10.163.71.160 11 | NATIVE_TRANSPORT_ADDRESS:3:10.163.71.160 12 | DSE_GOSSIP_STATE:556791:{"dse_version":"6.7.7","workloads":"SearchGraphCassandraAnalytics","workload":"SearchAnalytics","active":"true","server_id":"0A-CC-59-B2-D1-3B","graph":true,"health":1.0,"coreIndexingStatus":{},"indexingCores":[]} 13 | NET_VERSION:1:512 14 | HOST_ID:2:64449de7-40a2-4fc5-94e3-1ddbad6928fc 15 | NATIVE_TRANSPORT_READY:49471:true 16 | NATIVE_TRANSPORT_PORT:6:9042 17 | NATIVE_TRANSPORT_PORT_SSL:7:9042 18 | STORAGE_PORT:8:7000 19 | STORAGE_PORT_SSL:9:7001 20 | JMX_PORT:10:7199 21 | SCHEMA_COMPATIBILITY_VERSION:5:1 22 | TOKENS:49442: 23 | -------------------------------------------------------------------------------- /HISTORY.md: -------------------------------------------------------------------------------- 1 | # Montecristo History 2 | 3 | Montecristo was originally created as an internal project in The Last Pickle, who were acquired by Datastax in 2020. 4 | 5 | Datastax Professional Services adopted and further significantly enhanced the project into the codebase that is published. 6 | 7 | When releasing the internal project to be a public one, we chose to not transfer the git history, which includes the list of contributors, but we wished to acknowledge them within the repository. 8 | 9 | List of Contributors (In Surname Alphabetical Order): 10 | 11 | * Jeremy Artero 12 | * Pierre-Yves de Britto 13 | * Edward Capriolo 14 | * Joaquin Casares 15 | * Alexander Dejanovski 16 | * Rebecca Downes 17 | * Marvin Froeder 18 | * Miles Garnsey 19 | * Anthony Grasso 20 | * Jon Haddad 21 | * Jeremy Hanna 22 | * Andrew Hogg 23 | * Nate McCall 24 | * Phil Miesle 25 | * Kareem Missoumi 26 | * Yuki Morishita 27 | * Aaron Morton 28 | * Alex Ott 29 | * Alain Rodriguez 30 | * John Sanda 31 | * Mick Semb Wever 32 | * Radovan Zvoncek 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/os/DStat/TimeSlice.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.os.DStat 18 | 19 | data class TimeSlice(val cpu: CPUUsage, 20 | val disk: DiskActivity, 21 | val network: Network, 22 | val paging: Paging, 23 | val system: System, 24 | val memory: Memory 25 | ) -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/configuration/configuration_disk_policy.md: -------------------------------------------------------------------------------- 1 | ## Disk Failure Policies 2 | 3 | The disk failure policy controls how {{software}} reacts to issues when accessing the data directories disks. 4 | It is configured as follows: 5 | 6 | {{diskFailurePolicySetting}} 7 | 8 | The commit failure policy controls how {{software}} reacts to issues when accessing the commit log disks. 9 | It is configured as follows: 10 | 11 | {{commitFailurePolicySetting}} 12 | 13 | A value of **stop** can be used for both the `disk_failure_policy` and `commit_failure_policy` settings where the 14 | {{software}} service is set up to auto-restart. In this case, appropriate monitoring must be in place to allow detection of nodes in a zombie state. Otherwise, where auto-restart is unused a value of **die** should be used for both the `disk_failure_policy` and `commit_failure_policy` settings. In this case, using a setting other than **die** would leave the 15 | {{software}} process running which may create confusion or even hide outages. 16 | 17 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/application/ConfigValue.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.application 18 | 19 | data class ConfigValue (val isSet : Boolean, val defaultValue : String, val value : String) { 20 | 21 | fun getConfigValue() : String { 22 | return if (isSet) { 23 | value 24 | } else { 25 | defaultValue 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /montecristo/src/test/kotlin/com/datastax/montecristo/model/InstanceMetaTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model 18 | 19 | import com.datastax.montecristo.model.os.InstanceMeta 20 | import org.junit.Test 21 | 22 | class InstanceMetaTest { 23 | @Test 24 | fun parseTest() { 25 | val meta = InstanceMeta() 26 | val data = meta.instances["i3.2xlarge"] 27 | println("Data: $data") 28 | } 29 | } -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/operations/operations_gossip_pause.md: -------------------------------------------------------------------------------- 1 | ## Log Pause Warnings 2 | 3 | {{software}} has a mechanism that checks on itself to see if it has paused for too long. This mechanism helps to prevent the node from creating false positives and marking other nodes down in gossip. If these messages occur at any time other than the node starting up, then the message is a sign of a high load or the underlying OS being paused as can occur on a virtual machine. 4 | 5 | An example of the message: 6 | ```` 7 | WARN [GossipTasks:1] 2020-11-09 11:06:02,475 FailureDetector.java:278 - Not marking nodes down due to local pause of 81905048065 > 5000000000 8 | ```` 9 | 10 | If the number of warnings is relatively low then this is not a direct cause for concern and could be due to local restarts when applying patches or other operational reasons. If the number of warnings seen is elevated, the node will appear offline to other nodes more frequently, and will result in dropped operations. 11 | 12 | {{countOfWarnings}} 13 | 14 | {{localPauseMessagesTable}} 15 | -------------------------------------------------------------------------------- /montecristo/src/test/kotlin/com/datastax/montecristo/utils/HumanCountTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.utils 18 | 19 | import org.assertj.core.api.Assertions.assertThat 20 | import org.junit.Test 21 | 22 | internal class HumanCountTest { 23 | 24 | @Test 25 | fun compareTo() { 26 | val h1 = HumanCount(1000) 27 | val h2 = HumanCount(1000) 28 | 29 | assertThat(h1).isEqualTo(h2) 30 | } 31 | } -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/datamodel/datamodel_bloom_filters.md: -------------------------------------------------------------------------------- 1 | ## Bloom Filters 2 | 3 | Bloom filters are used by {{software}} to quickly determine if a partition key exists in a particular SSTable. The filter is kept in memory (stored off heap), and provides a probabilistic set membership test. It gives either a definitive "does not exist" result or "does exist" with a certain probability. The higher the probability of a false positive, when the filter returns true but the element is not in the set, the larger the bloom filter and the more memory it uses. 4 | 5 | The probability is controlled by the `bloom_filter_fp_chance` table property, which defaults to 0.10 when using LeveledCompactionStrategy and 0.01 when using SizeTieredCompactionStrategy. 6 | 7 | The rate of Bloom Filter false positives can be tracked via metrics and using the nodetool cfstats command. Typically we expect the rate to be close to the defined rate in the table schema. 8 | 9 | The amount of off-heap memory usage can be viewed per table using nodetool cfstats, or by JMX. 10 | 11 | {{overview}} 12 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/schema/schema_dse_types.txt: -------------------------------------------------------------------------------- 1 | CREATE KEYSPACE dse_insights_local WITH REPLICATION = { 'class' : 'org.apache.cassandra.locator.LocalStrategy' } AND DURABLE_WRITES = true; 2 | 3 | CREATE TYPE dse_insights_local.insights_filters_rule_type ( 4 | policy text, 5 | pattern text, 6 | scope text 7 | ); 8 | 9 | CREATE TYPE dse_insights_local.insights_config_type ( 10 | mode text, 11 | upload_url text, 12 | upload_interval_in_seconds int, 13 | metric_sampling_interval_in_seconds int, 14 | data_dir_max_size_in_mb int, 15 | proxy_type text, 16 | proxy_url text, 17 | proxy_authentication text, 18 | node_system_info_report_period text, 19 | config_refresh_interval_in_seconds int, 20 | filtering_rules frozen>> 21 | ); 22 | 23 | CREATE KEYSPACE foo WITH REPLICATION = { 'class' : 'org.apache.cassandra.locator.LocalStrategy' } AND DURABLE_WRITES = true; 24 | 25 | CREATE TYPE foo.bar ( 26 | some_field text, 27 | another_field text 28 | ); -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/operations/operations_commit_log_sync.md: -------------------------------------------------------------------------------- 1 | ## Commit Log Sync Warnings 2 | 3 | When the commit log is operating in the default `periodic` mode, the commit log is synchronized to disk based on the `commitlog_sync_period_in_ms`, which is by default 10 seconds. (10000 ms). 4 | 5 | When a system is under stress, particularly I/O stress the commit log synchronization can fall behind which results in warning log messages such as: 6 | 7 | ```` 8 | WARN [PERIODIC-COMMIT-LOG-SYNCER] 2020-11-02 11:20:24,835 NoSpamLogger.java:94 - Out of 72 commit log syncs over the past 76.78s with average duration of 206.57ms, 2 have exceeded the configured commit interval by an average of 966.04ms 9 | ```` 10 | 11 | If the number of warnings is relatively low then this is not a direct cause for concern - if the number of warnings seen is elevated and there is evidence of dropped mutations, then this would be indicative of an overloaded node, or a node with an I/O subsystem under considerable stress. 12 | 13 | {{countOfWarnings}} 14 | 15 | {{commitLogSyncMessagesTable}} 16 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/os/DStat/Paging.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.os.DStat 18 | 19 | import org.apache.commons.csv.CSVRecord 20 | 21 | data class Paging(val `in`: Long, val `out`: Long) { 22 | companion object { 23 | fun fromCSVRecord(csv: CSVRecord): Paging { 24 | return Paging(csv.get(9).toDouble().toLong(), csv.get(10).toDouble().toLong()) 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/storage/Storage.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.storage 18 | 19 | data class Storage (val storageLocations: StorageLocations, 20 | val diskDevices : Map, 21 | val blockdev : Blockdev, 22 | val dfSize: DfSize, 23 | val fsTab: Fstab, 24 | val lsBlk : Map) 25 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/versions/cassandra/CassandraV41x.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.versions.cassandra 18 | 19 | import com.datastax.montecristo.model.versions.DatabaseVersion 20 | 21 | class CassandraV41x (versionIdentifier: String) : CassandraV4x(versionIdentifier) { 22 | 23 | override fun latestRelease(): DatabaseVersion { 24 | return DatabaseVersion.latest41() 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/nodetool/info/nodetool_info_complete.txt: -------------------------------------------------------------------------------- 1 | ID : 19427ed3-3637-46aa-a05c-e54f36bcdfdb 2 | Gossip active : true 3 | Thrift active : true 4 | Native Transport active: true 5 | Load : 2.22 TB 6 | Generation No : 1619415338 7 | Uptime (seconds) : 3688807 8 | Heap Memory (MB) : 3889.52 / 9940.00 9 | Off Heap Memory (MB) : 406.43 10 | Data Center : datacenter1 11 | Rack : rack1 12 | Exceptions : 0 13 | Key Cache : entries 258510, size 99.92 MB, capacity 100 MB, 2275253322 hits, 2782186019 requests, 0.818 recent hit rate, 14400 save period in seconds 14 | Row Cache : entries 0, size 0 bytes, capacity 0 bytes, 0 hits, 0 requests, NaN recent hit rate, 0 save period in seconds 15 | Counter Cache : entries 7202, size 1023.27 KB, capacity 50 MB, 20982475 hits, 20985627 requests, 1.000 recent hit rate, 7200 save period in seconds 16 | Token : 137447753440135994638657972227406761775 17 | 18 | nodetool rc=0 -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/operations/operations_batches.md: -------------------------------------------------------------------------------- 1 | ## Batches 2 | 3 | Batches can be used to group together queries. Batches provide a guarantee all are eventually executed, but do not provide the semantics of a relational database such as atomicity (all or nothing) or isolation. They are most useful for queries on related tables (such as multiple views of the same data) but come at a significant overhead. We recommend limiting the usage of batches to only a few queries. 4 | 5 | Large batches can cause significant GC pauses and result in cluster instability. In the case of a single query in a batch failing, the entire batch will fail and must be retried. 6 | 7 | In the case of large clusters, two unavailable nodes can cause an entire batch to fail, resulting in a rapidly growing batch log and hint pileup. This can lead to a snowball effect resulting in additional downtime. 8 | 9 | Single partition batches do not have the overhead of multi-partition batches. They do not require the batch log and are executed atomically and in isolation as a single mutation. 10 | 11 | {{findingsSummary}} 12 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/os/DStat/System.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.os.DStat 18 | 19 | import org.apache.commons.csv.CSVRecord 20 | 21 | data class System(val int: Double, val csw: Double) { 22 | companion object { 23 | fun fromCSV(csv: CSVRecord): System { 24 | return System( 25 | csv.get(11).toDouble(), 26 | csv.get(12).toDouble()) 27 | 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/schema/schema-counters.cql: -------------------------------------------------------------------------------- 1 | CREATE KEYSPACE test_ks WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': '3', 'dc2': '3'} AND durable_writes = true; 2 | 3 | CREATE TABLE test_ks.aws_size ( 4 | root text, 5 | bucket text, 6 | objects counter, 7 | size counter, 8 | PRIMARY KEY ((root, bucket)) 9 | ) WITH bloom_filter_fp_chance = 0.01 10 | AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} 11 | AND comment = '' 12 | AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'} 13 | AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'} 14 | AND crc_check_chance = 1.0 15 | AND dclocal_read_repair_chance = 0.1 16 | AND default_time_to_live = 0 17 | AND gc_grace_seconds = 864000 18 | AND max_index_interval = 2048 19 | AND memtable_flush_period_in_ms = 0 20 | AND min_index_interval = 128 21 | AND read_repair_chance = 0.0 22 | AND speculative_retry = '99PERCENTILE'; 23 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/metrics/ParsedExpression.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.metrics 18 | 19 | /* 20 | Simple container for data parsed out of the metrics.jmx file 21 | */ 22 | data class ParsedExpression(val metric: String, 23 | val properties: Map, 24 | val arrayIndex: List, 25 | val key: String, 26 | val value: String) -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/metrics/jmxMetrics/Auth.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.metrics.jmxMetrics 18 | 19 | import java.sql.PreparedStatement 20 | 21 | class Auth : JMXMetric { 22 | override fun getPrepared(): String { 23 | return "" 24 | } 25 | 26 | override fun bindAll(preparedStatement: PreparedStatement) { 27 | } 28 | 29 | override fun toString() : String { 30 | return "Auth metrics not implemented" 31 | } 32 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/metrics/jmxMetrics/JMXMetric.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.metrics.jmxMetrics 18 | 19 | import java.sql.PreparedStatement 20 | 21 | interface JMXMetric { 22 | // returns a query to be prepared 23 | fun getPrepared() : String 24 | // we're going to assume the first bound variable is `host` and is already bound 25 | fun bindAll(preparedStatement: PreparedStatement) 26 | 27 | override fun toString() : String 28 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/metrics/jmxMetrics/Net.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.metrics.jmxMetrics 18 | 19 | import java.sql.PreparedStatement 20 | 21 | class Net : JMXMetric { 22 | override fun getPrepared(): String { 23 | return "" 24 | } 25 | 26 | override fun bindAll(preparedStatement: PreparedStatement) { 27 | } 28 | 29 | override fun toString() : String { 30 | return "Net metrics not implemented" 31 | } 32 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/application/DseYaml.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.application 18 | 19 | import com.fasterxml.jackson.databind.JsonNode 20 | 21 | data class DseYaml(val data : JsonNode) : YamlConfig(data) { 22 | 23 | val authenticationEnabled get() = getValueFromPath("authentication_options.enabled", "false") 24 | val authorizationEnabled get() = getValueFromPath("authorization_options.enabled", "false") 25 | 26 | } 27 | 28 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/os/DStat/DiskActivity.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.os.DStat 18 | 19 | import org.apache.commons.csv.CSVRecord 20 | 21 | class DiskActivity(val read: Double, val write: Double) { 22 | companion object { 23 | fun fromCSVRecord(csv: CSVRecord): DiskActivity { 24 | return DiskActivity( 25 | csv.get(5).toDouble(), 26 | csv.get(6).toDouble()) 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/os/DStat/Network.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.os.DStat 18 | 19 | import org.apache.commons.csv.CSVRecord 20 | 21 | data class Network(val recv: Long, val send: Long) { 22 | companion object { 23 | fun fromCSVRecord(csv: CSVRecord): Network { 24 | return Network( 25 | csv.get(7).toDouble().toLong(), 26 | csv.get(8).toDouble().toLong()) 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /montecristo/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright DataStax, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | set -x 16 | 17 | echo "Generating Database" 18 | java -Xms2g -Xmx6G -cp montecristo/target/montecristo.jar com.datastax.discovery.GenerateMetricsDBKt -d /root/basedir/metrics.db -i /root/extracted --overwrite 19 | 20 | # com.datastax.montecristo.GenerateMetricsDBKt -d /root/metrics.db -i /root/extracted --overwrite 21 | echo "Running montecristo" 22 | java -Xms2g -Xmx6G -jar montecristo/target/montecristo.jar /root/basedir/ 23 | 24 | mv montecristo-report.txt /root/reports/ 25 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/metrics/jmxMetrics/Transport.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.metrics.jmxMetrics 18 | 19 | import java.sql.PreparedStatement 20 | 21 | class Transport : JMXMetric { 22 | override fun getPrepared(): String { 23 | return "" 24 | } 25 | 26 | override fun bindAll(preparedStatement: PreparedStatement) { 27 | } 28 | 29 | override fun toString() : String { 30 | return "Transport metrics not implemented" 31 | } 32 | } -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/schema/schema.cql: -------------------------------------------------------------------------------- 1 | 2 | CREATE KEYSPACE testks WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': '3', 'dc2': '3'} AND durable_writes = true; 3 | 4 | CREATE TABLE testks.ip_subnet ( 5 | key text, 6 | id uuid, 7 | hostname text, 8 | pool_id uuid, 9 | PRIMARY KEY (key, id) 10 | ) WITH CLUSTERING ORDER BY (id ASC) 11 | AND bloom_filter_fp_chance = 0.01 12 | AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} 13 | AND comment = '' 14 | AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'} 15 | AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'} 16 | AND crc_check_chance = 1.0 17 | AND dclocal_read_repair_chance = 0.1 18 | AND default_time_to_live = 0 19 | AND gc_grace_seconds = 864000 20 | AND max_index_interval = 2048 21 | AND memtable_flush_period_in_ms = 0 22 | AND min_index_interval = 128 23 | AND read_repair_chance = 0.0 24 | AND speculative_retry = '99PERCENTILE'; 25 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/utils/OutputSectionCounter.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.utils 18 | 19 | class OutputSectionCounter private constructor() { 20 | private var index: Int = 0 21 | 22 | private object Holder { val INSTANCE = OutputSectionCounter() } 23 | 24 | companion object { 25 | val instance: OutputSectionCounter by lazy { Holder.INSTANCE } 26 | } 27 | 28 | fun incrementAndGet(): Int { 29 | this.index++ 30 | return this.index 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/metrics/SSTableStatistics.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.metrics 18 | 19 | data class SSTableStatistics(val data: List) { 20 | 21 | fun getRowCount (keyspaceTableName : String): Long { 22 | return data.filter { it.keyspaceTableName == keyspaceTableName }.sumOf { it.rowCount } 23 | } 24 | } 25 | 26 | data class SingleSSTableStatistic(val keyspaceTableName : String, val rowCount: Long, val incrementallyRepaired : Boolean) 27 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/versions/cassandra/CassandraV40x.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.versions.cassandra 18 | 19 | import com.datastax.montecristo.model.versions.DatabaseVersion 20 | 21 | class CassandraV40x (versionIdentifier: String) : CassandraV4x(versionIdentifier) { 22 | override fun latestRelease(): DatabaseVersion { 23 | return DatabaseVersion.latest40() 24 | } 25 | 26 | override fun hasUnitYamlValues(): Boolean { 27 | return false 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/os/lscpu.txt: -------------------------------------------------------------------------------- 1 | Architecture: x86_64 2 | CPU op-mode(s): 32-bit, 64-bit 3 | Byte Order: Little Endian 4 | CPU(s): 12 5 | On-line CPU(s) list: 0-11 6 | Thread(s) per core: 1 7 | Core(s) per socket: 1 8 | Socket(s): 12 9 | NUMA node(s): 2 10 | Vendor ID: GenuineIntel 11 | CPU family: 6 12 | Model: 58 13 | Model name: Intel(R) Xeon(R) CPU E5-2660 v3 @ 2.60GHz 14 | Stepping: 0 15 | CPU MHz: 2592.764 16 | BogoMIPS: 5187.50 17 | Hypervisor vendor: VMware 18 | Virtualization type: full 19 | L1d cache: 32K 20 | L1i cache: 32K 21 | L2 cache: 256K 22 | L3 cache: 25600K 23 | NUMA node0 CPU(s): 0-5 24 | NUMA node1 CPU(s): 6-11 25 | Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts nopl tsc_reliable nonstop_tsc eagerfpu pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm kaiser arat 26 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/themes/hugo-xmin-master/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Yihui Xie 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/datamodel/datamodel_readrepair.md: -------------------------------------------------------------------------------- 1 | ## Read repair 2 | 3 | Read Repair is a process that repairs inconsistencies between replicas during the read path. 4 | It functions in two modes: 5 | 6 | * **Blocking Read Repair** checks the results from replicas when a Consistency Level above ONE is used 7 | * **Non Blocking Read Repair** works in the background of a read to compare the data from more nodes than are required to meet the Consistency Level. 8 | 9 | Non Blocking Read Repair is controlled by two table properties: `read_repair_chance` and `dclocal_read_repair_chance`. 10 | 11 | The current defaults for these values are: 12 | 13 | ``` 14 | dclocal_read_repair_chance: 0.1 15 | read_repair_chance: 0.0 16 | ``` 17 | 18 | {{repairTable}} 19 | 20 | Using read repair can add significant overhead without offering any guarantees. We recommend using scheduled repairs to manage entropy, as the read repair chance is not intended as a reliable approach to repairing all data. More information on the topic can be read in [this blog post](https://thelastpickle.com/blog/2021/01/12/get_rid_of_repair_repair_chance.html). Reach out to DataStax Services for further help on scheduled repairs. -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/datamodel/datamodel_schema_unused_tables.md: -------------------------------------------------------------------------------- 1 | ## Unused Tables 2 | 3 | A large number of tables in {{software}} can directly impact the performance of the cluster. Typically, you should have no more than 200 actively used tables in a cluster. Should the number of active unused tables increase above 500, the cluster may be prone to performance degradation and failure. 4 | 5 | The problem arises because every table uses approximately 1 MB of memory for metadata. For each table acted on, a memtable representation is allocated. Tables with large amounts of data also increase pressure on memory by storing more data for the bloom filter and other auxiliary data structures. 6 | Also, each keyspace causes additional overhead in JVM memory. All of this together, impacts the performance of {{software}}. 7 | 8 | For that reason, it is recommended to backup data and then drop tables that are unused. The following tables appear to be unused based on traffic the diagnostic collector was able to observe. 9 | 10 | 11 | {{unusedTables}} 12 | 13 | 14 | 15 | --- 16 | 17 | **Noted for reference**: _We recommend dropping unused keyspaces and tables to facilitate operations._ 18 | 19 | --- 20 | 21 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/schema/schema-with-thrift.cql: -------------------------------------------------------------------------------- 1 | CREATE KEYSPACE "Thrift" WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': '3'} AND durable_writes = true; 2 | 3 | CREATE TABLE "Thrift"."ExampleTable1" ( 4 | key blob, 5 | column1 blob, 6 | column2 blob, 7 | "" map, 8 | value blob, 9 | PRIMARY KEY (key, column1, column2) 10 | ) WITH COMPACT STORAGE 11 | AND CLUSTERING ORDER BY (column1 ASC, column2 ASC) 12 | AND bloom_filter_fp_chance = 0.01 13 | AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} 14 | AND comment = '' 15 | AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'} 16 | AND compression = {'chunk_length_in_kb': '4', 'class': 'org.apache.cassandra.io.compress.SnappyCompressor'} 17 | AND crc_check_chance = 1.0 18 | AND dclocal_read_repair_chance = 0.1 19 | AND default_time_to_live = 0 20 | AND gc_grace_seconds = 172800 21 | AND max_index_interval = 2048 22 | AND memtable_flush_period_in_ms = 0 23 | AND min_index_interval = 128 24 | AND read_repair_chance = 0.1 25 | AND speculative_retry = 'NONE'; -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/os/MemInfo.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.os 18 | 19 | data class MemInfo(private val info: Map) { 20 | 21 | fun get(name: String): Long? { 22 | return info[name] 23 | } 24 | 25 | // helpers 26 | val memTotal get() = get("MemTotal") 27 | val memFree get() = get("MemFree") 28 | val memAvailable get() = get("MemAvailable") 29 | val cached get() = get("Cached") 30 | val swapTotal get() = get("SwapTotal") 31 | val swapFree get() = get("SwapFree") 32 | 33 | } 34 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/datamodel/datamodel_custom_types.md: -------------------------------------------------------------------------------- 1 | ## Custom types 2 | 3 | {{software}} allows creation of User Defined Types (UDTs). This type allows you to group related information together and use it as a single entity. From a data model analysis point of view, you can apply the same rules as for collections: 4 | 5 | * Use frozen UDTs where possible. 6 | * For non-frozen UDTs keep the number of fields to a minimum. 7 | 8 | One of the problems with UDTs arises from a schema evolution standpoint. While it is possible to add fields to UDTs, it is impossible to remove them. 9 | 10 | UDTs should only be used sparingly and when absolutely necessary. Otherwise, it is preferable to structure the data as regular columns in the table. Alternatively, store the UDT as a text blob and perform serialization and deserialization of UDT data inside the application. 11 | 12 | UDTs can be nested inside other UDTs or as elements in the collections. Caution needs to be taken when doing this. If too many elements exist in a collection or there are too many nested UDTs, then the size of the mutation will increase. If the maximum mutation size limit is reached, operations involving the table will fail. 13 | 14 | {{types}} 15 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/fileLoaders/parsers/os/SysCtlParser.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.fileLoaders.parsers.os 18 | 19 | import com.datastax.montecristo.fileLoaders.parsers.IFileParser 20 | import com.datastax.montecristo.model.os.Sysctl 21 | 22 | object SysCtlParser : IFileParser { 23 | 24 | override fun parse(data: List): Sysctl { 25 | 26 | val settingsMap = data.map { it.split("\\s+=\\s+".toRegex()) } 27 | .filter { it.size == 2 }.associate { Pair(it[0], it[1]) } 28 | return Sysctl(settingsMap) 29 | } 30 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/metrics/jmxMetrics/Request.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.metrics.jmxMetrics 18 | 19 | import java.sql.PreparedStatement 20 | 21 | class Request : JMXMetric { 22 | override fun getPrepared(): String { 23 | return "" 24 | } 25 | 26 | override fun bindAll(preparedStatement: PreparedStatement) { 27 | TODO("not implemented") //To change body of created functions use File | Settings | File Templates. 28 | } 29 | override fun toString() : String { 30 | return "Request metrics not implemented" 31 | } 32 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/versions/dse/DseV6X.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.versions.dse 18 | 19 | import com.datastax.montecristo.model.versions.DatabaseVersion 20 | 21 | class DseV6X(versionIdentifier: String) : Dse6Base(versionIdentifier) { 22 | override fun latestRelease(): DatabaseVersion { 23 | return DatabaseVersion.latestDSE60() 24 | } 25 | 26 | override fun recommendedOSSettingsLink(): String { 27 | return "https://docs.datastax.com/en/dse/6.0/dse-dev/datastax_enterprise/config/configRecommendedSettings.html" 28 | } 29 | } -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/datamodel/datamodel_schema_agreement.md: -------------------------------------------------------------------------------- 1 | ## Schema Versions 2 | 3 | In a peer-to-peer distributed system such as {{software}}, schema disagreement is caused by schema changes. When a series of schema updates are made, announcements of these can lead to a high volume of traffic over 4 | {{software}}’s messaging service. 5 | 6 | In large clusters, frequent schema updates can cause problems. If nodes are down during a period of frequent concurrent schema changes, then the disagreement can remain unresolved in the cluster. 7 | 8 | Ongoing schema disagreement can lead to loss of data. It can cause degraded availability for applications that expect or depend upon a particular schema version which some nodes are not carrying. 9 | 10 | Our discovery process deals only with a snapshot of the cluster's state, and if data is collected at different times we commonly see multiple schemas. However disagreement on schemas amongst nodes and slow schema propagation can be symptomatic of deeper problems in the cluster. If they are observed frequently this should be investigated. 11 | 12 | {{#agreement}} 13 | The schema versions are all in agreement. 14 | {{/agreement}} 15 | {{^agreement}} 16 | {{schemaVersions}} 17 | {{/agreement}} -------------------------------------------------------------------------------- /list/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright DataStax, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # replace placeholders with envars 17 | sed -ri "s|AWS_ACCESS_KEY_ID|${AWS_ACCESS_KEY_ID}|" ${WORKDIR}/.aws/credentials 18 | sed -ri "s|AWS_SECRET_ACCESS_KEY|${AWS_SECRET_ACCESS_KEY}|" ${WORKDIR}/.aws/credentials 19 | 20 | FOLDER="" 21 | if [ "x" != "x${1}" ]; then 22 | FOLDER="${1}/" 23 | fi 24 | # sync s3 bucket to mounted volume 25 | echo "Available artifact folders ${FOLDER}:" 26 | aws s3 ls s3://${2:-collector-dead-drop}/${FOLDER} | tr -s ' ' | sed 's/\///' | sed "s;PRE ;* ${FOLDER};" 27 | echo " " 28 | echo "Run the analysis as follows: ./run.sh " 29 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/os/DStat/Memory.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.os.DStat 18 | 19 | import org.apache.commons.csv.CSVRecord 20 | 21 | data class Memory(val used: Long, val free: Long, val buff: Long, val cach: Long) { 22 | companion object { 23 | fun fromCSV(csv: CSVRecord): Memory { 24 | return Memory(csv.get(13).toDouble().toLong(), 25 | csv.get(14).toDouble().toLong(), 26 | csv.get(15).toDouble().toLong(), 27 | csv.get(16).toDouble().toLong()) 28 | } 29 | } 30 | } 31 | 32 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/versions/dse/DseV67X.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.versions.dse 18 | 19 | import com.datastax.montecristo.model.versions.DatabaseVersion 20 | 21 | class DseV67X(versionIdentifier: String) : Dse6Base(versionIdentifier) { 22 | override fun latestRelease(): DatabaseVersion { 23 | return DatabaseVersion.latestDSE67() 24 | } 25 | 26 | override fun recommendedOSSettingsLink(): String { 27 | return "https://docs.datastax.com/en/dse/6.7/dse-dev/datastax_enterprise/config/configRecommendedSettings.html" 28 | } 29 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/fileLoaders/parsers/os/MemInfoParser.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.fileLoaders.parsers.os 18 | 19 | import com.datastax.montecristo.fileLoaders.parsers.IFileParser 20 | import com.datastax.montecristo.model.os.MemInfo 21 | 22 | object MemInfoParser : IFileParser { 23 | 24 | override fun parse(data: List): MemInfo { 25 | val splitLines = data.map { it.split(":?\\s+:?".toRegex()) }.filter { it.size == 3 } 26 | val info = splitLines.associate { Pair(it[0], it[1].toLong()) } 27 | return MemInfo(info) 28 | 29 | } 30 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/storage/StorageLocations.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.storage 18 | 19 | data class StorageLocations(val data : List, val path : String) { 20 | 21 | fun dataLocation() : String { 22 | return getSetting("data").split("/").last() 23 | } 24 | 25 | internal fun getSetting(setting : String): String { 26 | val value = data.firstOrNull { it.startsWith(setting) } 27 | if (!value.isNullOrEmpty() && value.contains(" ")) { 28 | return value.split(" ").last() 29 | } 30 | return "" 31 | } 32 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/versions/cassandra/CassandraV50x.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.versions.cassandra 18 | 19 | import com.datastax.montecristo.model.versions.DatabaseVersion 20 | 21 | class CassandraV50x (versionIdentifier: String) : Cassandra(versionIdentifier) { 22 | 23 | override fun latestRelease(): DatabaseVersion { 24 | return DatabaseVersion.latest50() 25 | } 26 | 27 | override fun isLatestMajorRelease(): Boolean { 28 | return true 29 | } 30 | 31 | override fun supportsUcs(): Boolean { 32 | return false 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /montecristo/src/test/kotlin/com/datastax/montecristo/fileLoaders/parsers/application/DseYamlParserTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.fileLoaders.parsers.application 18 | 19 | import org.assertj.core.api.Assertions.assertThat 20 | import org.junit.Test 21 | 22 | internal class DseYamlParserTest() { 23 | @Test 24 | fun testDseFileParse() { 25 | val yamlFile = this.javaClass.getResourceAsStream("/fileLoaders/parsers/application/dse.yaml").reader().readText() 26 | val dseYaml = DseYamlParser.parse(yamlFile) 27 | assertThat(dseYaml.get("enable_health_based_routing")).isEqualTo("true") 28 | } 29 | } -------------------------------------------------------------------------------- /pull/docker-entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Copyright DataStax, Inc. 3 | # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); 5 | # you may not use this file except in compliance with the License. 6 | # You may obtain a copy of the License at 7 | # 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # 10 | # Unless required by applicable law or agreed to in writing, software 11 | # distributed under the License is distributed on an "AS IS" BASIS, 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | # See the License for the specific language governing permissions and 14 | # limitations under the License. 15 | 16 | # replace placeholders with envars 17 | sed -ri "s|AWS_ACCESS_KEY_ID|${AWS_ACCESS_KEY_ID}|" ${WORKDIR}/.aws/credentials 18 | sed -ri "s|AWS_SECRET_ACCESS_KEY|${AWS_SECRET_ACCESS_KEY}|" ${WORKDIR}/.aws/credentials 19 | set -x 20 | 21 | case "$1" in 22 | # print usage 23 | "" ) echo Please provide a ticket name, in the form of PROJ-####, or 'bash'. 24 | exit;; 25 | esac 26 | case "$2" in 27 | # print usage 28 | "" ) echo Please provide a bucket name. 29 | exit;; 30 | esac 31 | 32 | # sync s3 bucket to mounted volume 33 | aws s3 sync s3://${2}/${1} artifacts/ 34 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/schema/Compression.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.schema 18 | 19 | data class Compression(val cls: String, val params: Map) { 20 | 21 | // helpers 22 | fun getChunkLength(): String { 23 | for ((key, value) in params) { 24 | if (key == "chunk_length_in_kb" || key == "chunk_length_kb") 25 | return value 26 | } 27 | // default for every version we know of 28 | return "64" 29 | } 30 | 31 | fun getShortName(): String { 32 | return cls.replace("org.apache.cassandra.io.compress.", "") 33 | } 34 | } -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/configuration/configuration_ring.md: -------------------------------------------------------------------------------- 1 | ## Token Ring 2 | 3 | An unbalanced load on a cluster means that some nodes will contain more data than others. It can be caused by the following: 4 | 5 | * Hot spots - by random chance one node ends up responsible for a higher percentage of the token space than the other nodes in the cluster. 6 | * Manual Token Ranges - by incorrect allocation of tokens when a cluster has been set up with manually configured tokens. 7 | * Node expansion - expandings the number of nodes while having a low number of vNodes configured 8 | * Allocation Configuration - the allocation algorithm is unused. The algorithm can be set in 3.11 using `allocate_tokens_for_keyspace` and in 4.0 using `allocate_tokens_for_local_replication_factor`. 9 | 10 | If a node contains disproportionately more tokens than other nodes in the cluster may experience one or more of the following issues: 11 | 12 | * Run out storage more quickly than the other nodes. 13 | * Serve more requests than the other nodes. 14 | * Suffer from higher read and write latencies than the other nodes. 15 | * Time to run repairs is longer than other nodes. 16 | * Time to run compactions is longer than other nodes. 17 | * Time to replace the node if it fails is longer than other nodes. 18 | 19 | {{ring}} -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/versions/dse/Dse6Base.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.versions.dse 18 | 19 | import com.datastax.montecristo.model.versions.cassandra.Cassandra 20 | 21 | abstract class Dse6Base(versionIdentifier: String) : Cassandra(versionIdentifier) { 22 | 23 | override fun supportsThrift(): Boolean { 24 | return false 25 | } 26 | 27 | override fun isSeda(): Boolean { 28 | return false 29 | } 30 | 31 | override fun defaultPermissionsValidity(): String { 32 | return "120000" 33 | } 34 | 35 | override fun hasUnitYamlValues(): Boolean { 36 | return false 37 | } 38 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/metrics/jmxMetrics/NoMatch.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.metrics.jmxMetrics 18 | 19 | import java.sql.PreparedStatement 20 | 21 | class NoMatch : JMXMetric { 22 | override fun getPrepared(): String { 23 | TODO("not implemented") //To change body of created functions use File | Settings | File Templates. 24 | } 25 | 26 | override fun bindAll(preparedStatement: PreparedStatement) { 27 | TODO("not implemented") //To change body of created functions use File | Settings | File Templates. 28 | } 29 | 30 | override fun toString() : String { 31 | return "NoMatch metrics not implemented" 32 | } 33 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/fileLoaders/parsers/os/LsCpuParser.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.fileLoaders.parsers.os 18 | 19 | import com.datastax.montecristo.fileLoaders.parsers.IFileParser 20 | import com.datastax.montecristo.model.os.LsCpu 21 | 22 | object LsCpuParser : IFileParser { 23 | 24 | override fun parse(data: List): LsCpu { 25 | val cpuData = data.map { it.replace("(s)", "s").split(":\\s+".toRegex()) }.associate { 26 | Pair( 27 | it[0], 28 | it.getOrNull(1) 29 | ) 30 | } // can not guarantee a file is well formed and parsing into pairs 31 | return LsCpu(cpuData) 32 | } 33 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/sections/structure/SectionHeadingDocument.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.sections.structure 18 | 19 | import com.datastax.montecristo.logs.Searcher 20 | import com.datastax.montecristo.model.Cluster 21 | import com.datastax.montecristo.model.profiles.ExecutionProfile 22 | import com.datastax.montecristo.sections.DocumentSection 23 | 24 | class SectionHeadingDocument(val heading : String) : DocumentSection { 25 | 26 | override fun getDocument( 27 | cluster: Cluster, 28 | logSearcher: Searcher, 29 | recs: MutableList, 30 | executionProfile: ExecutionProfile 31 | ): String { 32 | return "# $heading" 33 | } 34 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/utils/HumanCount.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.utils 18 | 19 | import com.datastax.montecristo.helpers.Utils 20 | 21 | class HumanCount(val num: Long) : Comparable { 22 | override fun compareTo(other: HumanCount): Int { 23 | return this.num.compareTo(other.num) 24 | } 25 | 26 | override fun toString(): String { 27 | return Utils.humanReadableCount(num) 28 | } 29 | 30 | override fun equals(other: Any?): Boolean { 31 | if(other !is HumanCount) 32 | return false 33 | 34 | return this.num == other.num 35 | } 36 | 37 | override fun hashCode(): Int { 38 | return num.hashCode() 39 | } 40 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/nodetool/Status.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.nodetool 18 | 19 | data class Status(val nodes: List, val rawContent : String) { 20 | 21 | fun hasDownedNodes(): Boolean { 22 | return nodes.any { it.status.startsWith("D") } 23 | } 24 | } 25 | 26 | data class StatusMetaData(val status: String, 27 | val address: String, 28 | val load: Long, 29 | val tokens: Int, 30 | val ownership: String, 31 | val hostId: String, 32 | val rack: String, 33 | val datacenter: String) 34 | 35 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/security/security_authentication.md: -------------------------------------------------------------------------------- 1 | ## Authentication 2 | 3 | 4 | {{authSettings}} 5 | 6 | Each time a query is run, the client must be authenticated and (if this is successful) have its permissions checked. This can be an expensive process, and by caching permissions for longer, we can avoid repeated reads from disk for the system_auth tables. 7 | 8 | This is set conservatively by default because when the validity period for credentials is extended, they will be checked for revocation less frequently. We find that credentials are rarely revoked in most 9 | {{software}} implementations, but if this occurs frequently in your system it may be a factor to consider. 10 | 11 | --- 12 | 13 | _**Consideration**: The {{software}} superuser uses QUORUM queries for authentication while other (super)users use ONE. A new superuser should be created for ops access and the cassandra user should be disabled. 14 | Apps and services should never access the database using a superuser._ 15 | 16 | {{#noAuth}} 17 | 18 | --- 19 | 20 | **Noted For Reference**: Enabling authentication and authorization will require additional changes including increasing the replication factor of the system_auth keyspace, adjusting cache timeouts, and creating roles and permissions. We can provide a runbook as well as automation to assist with these changes. 21 | 22 | --- 23 | {{/noAuth}} 24 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/schema/schema-with-solr.cql: -------------------------------------------------------------------------------- 1 | CREATE KEYSPACE cycling WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': '1'} AND durable_writes = true; 2 | 3 | CREATE TABLE cycling.cyclist_semi_pro ( 4 | id int PRIMARY KEY, 5 | affiliation text, 6 | age int, 7 | country text, 8 | firstname text, 9 | lastname text, 10 | registration date, 11 | solr_query text 12 | ) WITH additional_write_policy = '99PERCENTILE' 13 | AND bloom_filter_fp_chance = 0.01 14 | AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} 15 | AND comment = '' 16 | AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'} 17 | AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'} 18 | AND crc_check_chance = 1.0 19 | AND default_time_to_live = 0 20 | AND gc_grace_seconds = 864000 21 | AND max_index_interval = 2048 22 | AND memtable_flush_period_in_ms = 0 23 | AND min_index_interval = 128 24 | AND nodesync = {'enabled': 'true', 'incremental': 'true'} 25 | AND read_repair = 'BLOCKING' 26 | AND speculative_retry = '99PERCENTILE'; 27 | CREATE CUSTOM INDEX lastname_solr_idx ON cycling.cyclist_semi_pro (solr_query) USING 'com.datastax.bdp.search.solr.Cql3SolrSecondaryIndex'; -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/schema/schema-with-sai.cql: -------------------------------------------------------------------------------- 1 | CREATE KEYSPACE cycling WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': '1'} AND durable_writes = true; 2 | 3 | CREATE TABLE cycling.cyclist_semi_pro ( 4 | id int PRIMARY KEY, 5 | affiliation text, 6 | age int, 7 | country text, 8 | firstname text, 9 | lastname text, 10 | registration date 11 | ) WITH additional_write_policy = '99PERCENTILE' 12 | AND bloom_filter_fp_chance = 0.01 13 | AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} 14 | AND comment = '' 15 | AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'} 16 | AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'} 17 | AND crc_check_chance = 1.0 18 | AND default_time_to_live = 0 19 | AND gc_grace_seconds = 864000 20 | AND max_index_interval = 2048 21 | AND memtable_flush_period_in_ms = 0 22 | AND min_index_interval = 128 23 | AND nodesync = {'enabled': 'true', 'incremental': 'true'} 24 | AND read_repair = 'BLOCKING' 25 | AND speculative_retry = '99PERCENTILE'; 26 | CREATE CUSTOM INDEX lastname_sai_idx ON cycling.cyclist_semi_pro (lastname) USING 'StorageAttachedIndex' WITH OPTIONS = {'normalize': 'true', 'ascii': 'true', 'case_sensitive': 'false'}; -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/versions/dse/DseV4.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.versions.dse 18 | 19 | import com.datastax.montecristo.model.versions.DatabaseVersion 20 | import com.datastax.montecristo.model.versions.cassandra.CassandraV22x 21 | 22 | class DseV4(versionIdentifier: String) : CassandraV22x(versionIdentifier) { 23 | override fun latestRelease(): DatabaseVersion { 24 | return DatabaseVersion.latestDSE4() 25 | } 26 | 27 | override fun recommendedOSSettingsLink(): String { 28 | return "https://docs.datastax.com/en/dse/5.1/dse-dev/datastax_enterprise/config/configRecommendedSettings.html" 29 | } 30 | 31 | override fun hasUnitYamlValues(): Boolean { 32 | return false 33 | } 34 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/sections/structure/CollectedArtifacts.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.sections.structure 18 | 19 | import com.datastax.montecristo.logs.Searcher 20 | import com.datastax.montecristo.model.Cluster 21 | import com.datastax.montecristo.model.profiles.ExecutionProfile 22 | import com.datastax.montecristo.sections.DocumentSection 23 | 24 | class CollectedArtifacts : DocumentSection { 25 | override fun getDocument( 26 | cluster: Cluster, 27 | logSearcher: Searcher, 28 | recs: MutableList, 29 | executionProfile: ExecutionProfile 30 | ): String { 31 | val args = super.createDocArgs(cluster) 32 | return compileAndExecute("structure/artifacts.md", args) 33 | } 34 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/versions/cassandra/CassandraV311x.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.versions.cassandra 18 | 19 | import com.datastax.montecristo.model.versions.DatabaseVersion 20 | 21 | open class CassandraV311x (versionIdentifier: String) : Cassandra(versionIdentifier) { 22 | override fun isSupported(): Boolean { 23 | return true 24 | } 25 | override fun latestRelease(): DatabaseVersion { 26 | return DatabaseVersion.latest311() 27 | } 28 | 29 | override fun recommendedOSSettingsLink(): String { 30 | return "https://docs.datastax.com/en/cassandra-oss/3.x/cassandra/install/installRecommendSettings.html" 31 | } 32 | 33 | override fun hasUnitYamlValues(): Boolean { 34 | return false 35 | } 36 | } -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/schema/schema-with2i.cql: -------------------------------------------------------------------------------- 1 | 2 | CREATE KEYSPACE testks WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true; 3 | 4 | CREATE TABLE testks.log ( 5 | type text, 6 | time timeuuid, 7 | info map, 8 | status text, 9 | task_id text, 10 | PRIMARY KEY (type, time) 11 | ) WITH CLUSTERING ORDER BY (time ASC) 12 | AND bloom_filter_fp_chance = 0.01 13 | AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} 14 | AND comment = '' 15 | AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'} 16 | AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'} 17 | AND crc_check_chance = 1.0 18 | AND dclocal_read_repair_chance = 0.1 19 | AND default_time_to_live = 0 20 | AND gc_grace_seconds = 0 21 | AND max_index_interval = 2048 22 | AND memtable_flush_period_in_ms = 0 23 | AND min_index_interval = 128 24 | AND read_repair_chance = 0.0 25 | AND speculative_retry = '99PERCENTILE'; 26 | CREATE INDEX log_task_id ON testks.log (task_id); 27 | CREATE INDEX log_info ON testks.log (values(info)); 28 | CREATE INDEX log_info_entries ON testks.log (entries(info)); 29 | CREATE INDEX log_info_key ON testks.log (keys(info)); 30 | CREATE INDEX log_status ON testks.log (status); 31 | 32 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/application/ConfigurationSetting.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.application 18 | 19 | 20 | data class ConfigurationSetting(val name: String, val values: Map) { 21 | 22 | // helpers 23 | fun isConsistent() = getDistinctValues().size == 1 24 | 25 | fun areAllUnset() = values.filter { it.value.isSet }.isEmpty() 26 | 27 | fun getDistinctValues(): Set { 28 | return values.map { it.value }.toSet() 29 | } 30 | 31 | // this helper is for when you are in a isConsistent=true scenario, it stops the boiler plate .entries.first.value.value occurring throughout the code 32 | fun getSingleValue(): String { 33 | return values.entries.first().value.getConfigValue() 34 | } 35 | } 36 | 37 | -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/operations/operations_dropped_messages.md: -------------------------------------------------------------------------------- 1 | ## Dropped Messages 2 | 3 | {{software}} logs when messages are dropped, via the same mechanism as dropped messages reported in nodetool tpstats, and records the state of the thread pools at the time. This is logged in two different ways, via JMX metrics and within the log files. 4 | 5 | The JMX metrics cover a smaller portion of time, designed for more real-time monitoring, while the log messages provide a history built up over time. 6 | 7 | More dropped messages on a particular node may indicate an issue with hardware or network connectivity. 8 | 9 | ### JMX Metrics 10 | * **Dropped Mutations**: There were a total of {{totalDroppedMutations}} dropped mutations across the cluster. Dropped mutations can leave the cluster in a state where data is inconsistent between nodes. Without a repair (either read repair or explicit repair via reaper or nodetool) there is a risk of data loss. 11 | 12 | * **Dropped Reads**: Dropped reads are another sign of an overloaded server. 13 | 14 | Here are the number of dropped messages per node within the JMX Metrics. 15 | 16 | {{jmxDroppedMutations}} 17 | 18 | ### Logged Dropped Mutations 19 | 20 | Here are the number of dropped messages per node within the log files provided. 21 | 22 | {{logDroppedMutations}} 23 | 24 | {{#hitMessageLimit}} 25 | We found more than 1,000,000 log messages of dropped mutations found within the logs. 26 | {{/hitMessageLimit}} -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/os/Sysctl.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.os 18 | 19 | data class Sysctl(val info: Map) { 20 | 21 | fun get(name: String): String? { 22 | return info[name] 23 | } 24 | 25 | // helpers 26 | val vmswappiness get() = get("vm.swappiness") 27 | val vmMaxMapCount get() = get("vm.max_map_count") 28 | 29 | val netRmemMax get() = get("net.core.rmem_max") 30 | val netWmemMax get() = get("net.core.wmem_max") 31 | val netRmemDefault get() = get("net.core.rmem_default") 32 | val netWmemDefault get() = get("net.core.wmem_default") 33 | val netOptMemMax get() = get ("net.core.optmem_max") 34 | val netIpv4TcpRmem get() = get ("net.ipv4.tcp_rmem") 35 | val netIpv4TcpWmem get() = get ("net.ipv4.tcp_wmem") 36 | } -------------------------------------------------------------------------------- /montecristo/src/main/resources/hugo/themes/hugo-xmin-master/README.md: -------------------------------------------------------------------------------- 1 | # HUGO XMIN 2 | 3 | ## _Keep it simple, but not simpler_ 4 | 5 | **XMin** is a Hugo theme written by [Yihui Xie](https://yihui.name) in about four hours: half an hour was spent on the Hugo templates, and 3.5 hours were spent on styling. The main motivation for writing this theme was to provide a really minimal example to beginners of Hugo templates. This XMin theme contains about 130 lines of code in total, including the code in HTML templates and CSS (also counting empty lines). 6 | 7 | 8 | ```bash 9 | find . -not -path '*/exampleSite/*' \( -name '*.html' -o -name '*.css' \) | xargs wc -l 10 | ``` 11 | 12 | ``` 13 | 5 ./layouts/404.html 14 | 18 ./layouts/_default/list.html 15 | 12 ./layouts/_default/single.html 16 | 16 ./layouts/_default/terms.html 17 | 0 ./layouts/partials/foot_custom.html 18 | 9 ./layouts/partials/footer.html 19 | 0 ./layouts/partials/head_custom.html 20 | 20 ./layouts/partials/header.html 21 | 7 ./static/css/fonts.css 22 | 50 ./static/css/style.css 23 | 137 total 24 | ``` 25 | 26 | I can certainly further reduce the code, for example, by eliminating the CSS, but I believe a tiny bit CSS can greatly improve readability. You cannot really find many CSS frameworks that only contain 50 lines of code. 27 | 28 | [![Screenshot](https://github.com/yihui/hugo-xmin/raw/master/images/screenshot.png)](https://xmin.yihui.name) 29 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/schema/schema-with-sasi.cql: -------------------------------------------------------------------------------- 1 | CREATE KEYSPACE cycling WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1': '1'} AND durable_writes = true; 2 | 3 | CREATE TABLE cycling.cyclist_semi_pro ( 4 | id int PRIMARY KEY, 5 | affiliation text, 6 | age int, 7 | country text, 8 | firstname text, 9 | lastname text, 10 | registration date 11 | ) WITH additional_write_policy = '99PERCENTILE' 12 | AND bloom_filter_fp_chance = 0.01 13 | AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} 14 | AND comment = '' 15 | AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'} 16 | AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'} 17 | AND crc_check_chance = 1.0 18 | AND default_time_to_live = 0 19 | AND gc_grace_seconds = 864000 20 | AND max_index_interval = 2048 21 | AND memtable_flush_period_in_ms = 0 22 | AND min_index_interval = 128 23 | AND nodesync = {'enabled': 'true', 'incremental': 'true'} 24 | AND read_repair = 'BLOCKING' 25 | AND speculative_retry = '99PERCENTILE'; 26 | CREATE CUSTOM INDEX lastname_sasi_idx ON cycling.cyclist_semi_pro (lastname) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'analyzer_class': 'org.apache.cassandra.index.sasi.analyzer.NonTokenizingAnalyzer', 'mode': 'CONTAINS'}; 27 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/metrics/BlockedTasks.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.metrics 18 | 19 | import com.datastax.montecristo.metrics.IMetricServer 20 | 21 | data class BlockedTasks(val metricsServer: IMetricServer) { 22 | val antiEntropy = metricsServer.getBlockedTaskCounts( "AntiEntropyStage") 23 | val compaction = metricsServer.getBlockedTaskCounts("CompactionExecutor") 24 | val gossip = metricsServer.getBlockedTaskCounts( "GossipStage") 25 | val hintedHandoff = metricsServer.getBlockedTaskCounts( "HintedHandoff") 26 | val memtableFlushWriters = metricsServer.getBlockedTaskCounts( "MemtableFlushWriter") 27 | val migration = metricsServer.getBlockedTaskCounts( "MigrationStage") 28 | val validation = metricsServer.getBlockedTaskCounts("ValidationExecutor") 29 | } 30 | 31 | -------------------------------------------------------------------------------- /montecristo/src/test/kotlin/com/datastax/montecristo/logs/logMessageParsers/GossipLogPausesWarningsMessageTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.logs.logMessageParsers 18 | 19 | import com.datastax.montecristo.logs.LogEntry 20 | import org.assertj.core.api.Assertions.assertThat 21 | import org.junit.Test 22 | 23 | internal class GossipLogPausesWarningsMessageTest() { 24 | 25 | @Test 26 | fun testRegexParse() { 27 | val logEntry = LogEntry("WARN", "FailureDetector.java:288 - Not marking nodes down due to local pause of 7994062116 > 5000000000", "20201030020005", "test_node") 28 | val parsedEntry = GossipLogPauseMessage.fromLogEntry(logEntry) 29 | assertThat(parsedEntry?.host).isEqualTo("test_node") 30 | assertThat(parsedEntry?.pauseTimeInMs).isEqualTo(7994062116 / 1_000_000) // ns to ms 31 | } 32 | } -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/nodetool/status/multi_dc_mixed_vnodes_all_UN.txt: -------------------------------------------------------------------------------- 1 | Datacenter: dcA 2 | ============= 3 | Status=Up/Down 4 | |/ State=Normal/Leaving/Joining/Moving 5 | -- Address Load Tokens Owns Host ID Rack 6 | UN 10.0.0.1 84.72 GB 1 ? d9349432-1860-4dde-b7b5-7027badd2042 9 7 | UN 10.0.0.2 81.55 GB 1 ? f2bbe1af-61cf-43cf-b28a-8fd298f03da2 17 8 | UN 10.0.0.3 106.61 GB 1 ? 2b8dec4e-3bd3-4f37-b598-32ff937563ee 19 9 | UN 10.0.0.4 56.72 GB 1 ? 0c67c379-4f96-4fcd-a9ab-d4ecb4d1ee22 17 10 | UN 10.0.0.5 95.17 GB 1 ? 70e10406-e7fc-4805-aa75-7eb4d2f2e5fb 20 11 | Datacenter: dcB 12 | ============= 13 | Status=Up/Down 14 | |/ State=Normal/Leaving/Joining/Moving 15 | -- Address Load Tokens Owns Host ID Rack 16 | UN 10.1.0.1 73.36 GB 256 ? 80011c62-5377-4dba-99b2-8f05bc6eea10 9 17 | UN 10.1.0.2 78.68 GB 256 ? 3d038137-602a-4736-8631-386f35b48a1b 3 18 | UN 10.1.0.3 80.77 GB 256 ? 418e72f3-8e31-4be9-a1f2-4f1dee41acaf 2 19 | UN 10.1.0.4 71.34 GB 256 ? d02cbdf2-c55f-4481-9973-fdaa6f274e61 1 20 | UN 10.1.0.5 70.29 GB 256 ? f6db6749-61dd-450d-8806-8aba74949a0e 6 21 | 22 | Note: Non-system keyspaces don't have the same replication settings, effective ownership information is meaningless 23 | 24 | nodetool rc=0 25 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/fileLoaders/parsers/application/DseYamlParser.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.fileLoaders.parsers.application 18 | 19 | import com.fasterxml.jackson.databind.ObjectMapper 20 | import com.fasterxml.jackson.dataformat.yaml.YAMLFactory 21 | import com.datastax.montecristo.model.application.DseYaml 22 | import java.io.File 23 | 24 | object DseYamlParser { 25 | 26 | fun parse(yamlFile: File): DseYaml { 27 | return parse(yamlFile.readText()) 28 | } 29 | 30 | fun parse(data: String): DseYaml { 31 | val yamlReader = ObjectMapper(YAMLFactory()) 32 | val obj = yamlReader.readValue(data, Any::class.java) 33 | val jsonWriter = ObjectMapper() 34 | val json = jsonWriter.readTree(jsonWriter.writeValueAsString(obj)) 35 | return DseYaml(json) 36 | } 37 | } -------------------------------------------------------------------------------- /montecristo/src/main/resources/templates/operations/operations_prepared_statements_discarded.md: -------------------------------------------------------------------------------- 1 | ## Prepared Statements 2 | 3 | Each query from an application can be prepared and stored within a prepared statement cache. If an application prepares a statement incorrectly and include literal values, the statement cache floods rapidly with hundreds of versions of the same query. 4 | 5 | When the database detects this, {{software}} issues a warning into the logs that it is discarding too many prepared statements. The warning will appear such as: 6 | 7 | ```` 8 | WARN [ScheduledTasks:1] 2020-11-02 11:20:24,835 QueryProcessor.java:148 - 123 prepared statements discarded in the last minute because cache limit reached (125 MB) 9 | ```` 10 | 11 | The query cache can be inspected by querying the `system.prepared_statements` table with CQL, queries that appear with literal values are not prepared correctly and should be corrected within the application code. 12 | 13 | {{#warningsByDateTable.empty}} 14 | No prepared statement discard warnings detected. 15 | {{/warningsByDateTable.empty}} 16 | 17 | {{^warningsByDateTable.isEmpty}} 18 | {{^hitMessageLimit}} 19 | There were {{numWarnings}} warnings within the logs. 20 | {{/hitMessageLimit}} 21 | 22 | Warnings by Date for the last 14 dates: 23 | 24 | {{warningsByDateTable}} 25 | 26 | {{/warningsByDateTable.isEmpty}} 27 | 28 | {{#hitMessageLimit}} 29 | We found more than {{numWarnings}} messages of discarded prepared statements within the logs. 30 | {{/hitMessageLimit}} -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/os/DStat/CPUUsage.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.os.DStat 18 | 19 | import org.apache.commons.csv.CSVRecord 20 | 21 | data class CPUUsage(val usr: Double, val sys: Double, val idl: Double, val wai: Double, val stl: Double) { 22 | companion object { 23 | /** 24 | * Needed for testing 25 | */ 26 | fun empty(): CPUUsage { 27 | return CPUUsage(0.0, 0.0, 0.0, 0.0, 0.0) 28 | } 29 | 30 | fun fromCSVRecord(csv: CSVRecord): CPUUsage { 31 | return CPUUsage( 32 | csv.get(0).toDouble(), 33 | csv.get(1).toDouble(), 34 | csv.get(2).toDouble(), 35 | csv.get(3).toDouble(), 36 | csv.get(4).toDouble() 37 | ) 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/nodetool/gossip/gossipinfo_oss.txt: -------------------------------------------------------------------------------- 1 | /10.51.41.59 2 | generation:1612788628 3 | heartbeat:4459098 4 | STATUS:16:NORMAL,-1050487914516120135 5 | LOAD:4459060:4.58797557297E11 6 | SCHEMA:4413779:1c26302b-8e2a-3c80-a5dc-76fe0e493d4c 7 | DC:8:DC2 8 | RACK:10:host04 9 | RELEASE_VERSION:4:3.11.2 10 | INTERNAL_IP:6:10.51.41.59 11 | RPC_ADDRESS:3:10.51.45.59 12 | NET_VERSION:1:11 13 | HOST_ID:2:7c9af0b3-0ee7-49dc-8acb-d4a00e6ecd85 14 | RPC_READY:36:true 15 | TOKENS:15: 16 | /10.51.41.58 17 | generation:1612789216 18 | heartbeat:4458520 19 | STATUS:16:NORMAL,-1042552286764664023 20 | LOAD:4458466:3.90179442951E11 21 | SCHEMA:4413203:1c26302b-8e2a-3c80-a5dc-76fe0e493d4c 22 | DC:8:DC2 23 | RACK:10:host05 24 | RELEASE_VERSION:4:3.11.2 25 | INTERNAL_IP:6:10.51.41.58 26 | RPC_ADDRESS:3:10.51.45.58 27 | NET_VERSION:1:11 28 | HOST_ID:2:4d89f1ca-6f3f-46da-9a68-0717db927143 29 | RPC_READY:36:true 30 | TOKENS:15: 31 | /10.51.41.57 32 | generation:1612789168 33 | heartbeat:4458490 34 | STATUS:16:NORMAL,-1020102217712394509 35 | LOAD:4458454:4.17223511495E11 36 | SCHEMA:4413174:1c26302b-8e2a-3c80-a5dc-76fe0e493d4c 37 | DC:8:DC2 38 | RACK:10:host05 39 | RELEASE_VERSION:4:3.11.2 40 | INTERNAL_IP:6:10.51.41.57 41 | RPC_ADDRESS:3:10.51.45.57 42 | NET_VERSION:1:11 43 | HOST_ID:2:a85cbb17-238c-45f7-a20e-e91e9e264f4f 44 | RPC_READY:33:true 45 | TOKENS:15: 46 | 47 | 48 | nodetool rc=0 49 | -------------------------------------------------------------------------------- /montecristo/src/test/resources/metrics/os/meminfo: -------------------------------------------------------------------------------- 1 | MemTotal: 62879940 kB 2 | MemFree: 3967944 kB 3 | MemAvailable: 48697588 kB 4 | Buffers: 213688 kB 5 | Cached: 45125572 kB 6 | SwapCached: 0 kB 7 | Active: 9530408 kB 8 | Inactive: 37272340 kB 9 | Active(anon): 1777076 kB 10 | Inactive(anon): 355120 kB 11 | Active(file): 7753332 kB 12 | Inactive(file): 36917220 kB 13 | Unevictable: 11185320 kB 14 | Mlocked: 11185320 kB 15 | SwapTotal: 0 kB 16 | SwapFree: 0 kB 17 | Dirty: 6400 kB 18 | Writeback: 0 kB 19 | AnonPages: 12648980 kB 20 | Mapped: 1867320 kB 21 | Shmem: 646556 kB 22 | Slab: 637864 kB 23 | SReclaimable: 583028 kB 24 | SUnreclaim: 54836 kB 25 | KernelStack: 13744 kB 26 | PageTables: 55944 kB 27 | NFS_Unstable: 0 kB 28 | Bounce: 0 kB 29 | WritebackTmp: 0 kB 30 | CommitLimit: 31439968 kB 31 | Committed_AS: 11139040 kB 32 | VmallocTotal: 34359738367 kB 33 | VmallocUsed: 0 kB 34 | VmallocChunk: 0 kB 35 | HardwareCorrupted: 0 kB 36 | AnonHugePages: 10338304 kB 37 | CmaTotal: 0 kB 38 | CmaFree: 0 kB 39 | HugePages_Total: 0 40 | HugePages_Free: 0 41 | HugePages_Rsvd: 0 42 | HugePages_Surp: 0 43 | Hugepagesize: 2048 kB 44 | DirectMap4k: 346112 kB 45 | DirectMap2M: 10139648 kB 46 | DirectMap1G: 55574528 kB -------------------------------------------------------------------------------- /montecristo/src/test/kotlin/com/datastax/montecristo/model/nodetool/DescribeClusterTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.nodetool 18 | 19 | import org.assertj.core.api.Assertions.assertThat 20 | import org.junit.Test 21 | 22 | internal class DescribeClusterTest{ 23 | 24 | @Test 25 | fun testBasicDescribeClsuterFile() { 26 | val content = this.javaClass.getResourceAsStream("/fileLoaders/parsers/nodetool/describeCluster.txt").reader().readLines() 27 | val describeCluster = DescribeCluster(content, "test") 28 | 29 | assertThat(describeCluster.getName()).isEqualTo("TestClusterName") 30 | assertThat(describeCluster.getPartitioner()).isEqualTo("org.apache.cassandra.dht.Murmur3Partitioner") 31 | assertThat(describeCluster.getSnitch()).isEqualTo("org.apache.cassandra.locator.GossipingPropertyFileSnitch") 32 | } 33 | 34 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/versions/dse/DseV5x.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.versions.dse 18 | 19 | import com.datastax.montecristo.model.versions.DatabaseVersion 20 | import com.datastax.montecristo.model.versions.cassandra.CassandraV3x 21 | 22 | class DseV5x(versionIdentifier: String) : CassandraV3x(versionIdentifier) { 23 | override fun supportsOffHeapMemtables(): Boolean { 24 | return false 25 | } 26 | 27 | override fun latestRelease(): DatabaseVersion { 28 | return DatabaseVersion.latestDSE50() 29 | } 30 | 31 | override fun recommendedOSSettingsLink(): String { 32 | return "https://docs.datastax.com/en/dse/5.1/dse-dev/datastax_enterprise/config/configRecommendedSettings.html" 33 | } 34 | 35 | override fun hasUnitYamlValues(): Boolean { 36 | return false 37 | } 38 | } -------------------------------------------------------------------------------- /montecristo/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | INFO 6 | 7 | 8 | 9 | %msg%n 10 | 11 | 12 | 13 | 14 | 16 | 17 | INFO 18 | 19 | montecristo-report.txt 20 | 21 | 22 | %d{yyyy-MM-dd HH:mm:ss} - %msg%n 23 | 24 | 25 | 26 | 27 | 28 | ${DEV_HOME}/archived/debug.%d{yyyy-MM-dd}.%i.log 29 | 30 | 32 | 10MB 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /dse-stats-converter/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | INFO 6 | 7 | 8 | 9 | %msg%n 10 | 11 | 12 | 13 | 14 | 16 | 17 | INFO 18 | 19 | dse-stats-report.txt 20 | 21 | 22 | %d{yyyy-MM-dd HH:mm:ss} - %msg%n 23 | 24 | 25 | 26 | 27 | 28 | ${DEV_HOME}/archived/debug.%d{yyyy-MM-dd}.%i.log 29 | 30 | 32 | 10MB 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/versions/dse/DseV51x.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.versions.dse 18 | 19 | import com.datastax.montecristo.model.versions.DatabaseVersion 20 | import com.datastax.montecristo.model.versions.cassandra.CassandraV311x 21 | 22 | class DseV51x(versionIdentifier: String) : CassandraV311x(versionIdentifier) { 23 | override fun isSupported(): Boolean { 24 | return true 25 | } 26 | 27 | override fun latestRelease(): DatabaseVersion { 28 | return DatabaseVersion.latestDSE51() 29 | } 30 | 31 | override fun supportsCredentialValiditySetting(): Boolean { 32 | return true 33 | } 34 | 35 | override fun recommendedOSSettingsLink(): String { 36 | return "https://docs.datastax.com/en/dse/5.1/dse-dev/datastax_enterprise/config/configRecommendedSettings.html" 37 | } 38 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/storage/DfSize.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.storage 18 | 19 | data class DfSize (val data : List, val path : String) { 20 | 21 | fun usedSpacePercentage(volume : String) : Int? { 22 | val volumeRow = data.firstOrNull { it.startsWith("/dev/$volume") } 23 | if (!volumeRow.isNullOrEmpty ()) { 24 | val regex = "(\\S*)\\s*(\\S*)\\s*(\\S*)\\s*(\\S*)\\s*(\\S*)\\s*(\\S*)".toRegex() 25 | if (volumeRow.matches(regex)) { 26 | val groups = regex.find(volumeRow)?.groups 27 | if (groups?.size ?: 0 >= 5) { 28 | val percentageString = groups!![5]?.value ?: "" 29 | return percentageString.replace("%", "").toIntOrNull() 30 | } 31 | } 32 | } 33 | return null 34 | } 35 | } -------------------------------------------------------------------------------- /old-c-stats-converter/src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | INFO 6 | 7 | 8 | 9 | %msg%n 10 | 11 | 12 | 13 | 14 | 16 | 17 | INFO 18 | 19 | old-c-stats-report.txt 20 | 21 | 22 | %d{yyyy-MM-dd HH:mm:ss} - %msg%n 23 | 24 | 25 | 26 | 27 | 28 | ${DEV_HOME}/archived/debug.%d{yyyy-MM-dd}.%i.log 29 | 30 | 32 | 10MB 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/fileLoaders/parsers/application/CassandraYamlParser.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.fileLoaders.parsers.application 18 | 19 | import com.fasterxml.jackson.databind.ObjectMapper 20 | import com.fasterxml.jackson.dataformat.yaml.YAMLFactory 21 | import com.datastax.montecristo.model.application.CassandraYaml 22 | import java.io.File 23 | 24 | object CassandraYamlParser { 25 | 26 | fun parse(yamlFile: File): CassandraYaml { 27 | return parse(yamlFile.readText()) 28 | } 29 | 30 | fun parse(data: String): CassandraYaml { 31 | val yamlReader = ObjectMapper(YAMLFactory()) 32 | val obj = yamlReader.readValue(data, Any::class.java) 33 | val jsonWriter = ObjectMapper() 34 | val json = jsonWriter.readTree(jsonWriter.writeValueAsString(obj)) 35 | return CassandraYaml(json) 36 | } 37 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/logs/LogbackAppender.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.logs 18 | 19 | data class LogbackAppender(val name: String, 20 | val appenderClass: String, 21 | val filePatterns: List = emptyList(), 22 | val maxLevel: LogLevel, 23 | val encoderPattern : String) 24 | 25 | { 26 | 27 | companion object { 28 | 29 | fun defaultSystemLog() : LogbackAppender { 30 | return LogbackAppender( 31 | "STDOUT", 32 | "ch.qos.logback.core.rolling.RollingFileAppender", 33 | listOf("\${cassandra.logdir}/system.log"), 34 | LogLevel.INFO, 35 | "%-5level [%thread] %date{ISO8601} %F:%L - %msg%n" 36 | ) 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/utils/MontecristoMustacheFactory.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.utils 18 | 19 | import com.github.mustachejava.DefaultMustacheFactory 20 | import java.io.StringReader 21 | import java.io.StringWriter 22 | import java.io.Writer 23 | 24 | class MontecristoMustacheFactory : DefaultMustacheFactory() { 25 | // this is overridden to stop the HTML escape characters 26 | override fun encode(value: String?, writer: Writer?) { 27 | writer!!.write(value) 28 | } 29 | 30 | fun compileAndExecute(resource: String, scope: Any): String { 31 | val result = StringWriter() 32 | val input = StringReader(this::class.java.getResource("/templates/$resource").readText()) 33 | val template = compile(input, resource) 34 | template.execute(result, scope) 35 | return result.toString() 36 | } 37 | 38 | 39 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/os/Configuration.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.os 18 | 19 | import com.datastax.montecristo.model.os.DStat.DStat 20 | 21 | /** 22 | * Wrapper class grouping up for all types of node-level OS configuration information 23 | */ 24 | data class Configuration(val memInfo: MemInfo, 25 | val sysctl: Sysctl, 26 | val lsCpu: LsCpu, 27 | val dstat: DStat, 28 | val javaVersion: String, 29 | val psAux: PsAux, 30 | val ntp: Ntp, 31 | val env: Env, 32 | val ifConfig: IfConfig, 33 | val osReleaseName : String, 34 | val limits : Limits, 35 | val hugePages : TransparentHugePageDefrag) -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/os/PsAux.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model.os 18 | 19 | data class PsAux(val data : List, val path : String) { 20 | 21 | fun getNodeProcessLine() : String? { 22 | return data.firstOrNull{ it.contains("CassandraDaemon") } 23 | ?: data.firstOrNull{ it.contains("DseModule") } 24 | ?: data.firstOrNull{ it.contains("/usr/share/cassandra") || 25 | it.contains("/usr/local/cassandra") || 26 | it.contains("/usr/share/dse/cassandra") || 27 | it.contains("/opt/dse/") } 28 | } 29 | 30 | fun getCassandraRunningUser() : String { 31 | val runningUser = getNodeProcessLine()?.split(" ")?.first() ?: "" 32 | 33 | return if (runningUser == "cassand+") { 34 | "cassandra" 35 | } else { 36 | runningUser 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /dse-stats-converter/src/test/kotlin/com/datastax/dsestatsconverter/ConvertTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.dsestatsconverter 18 | 19 | import org.junit.Ignore 20 | import org.junit.Test 21 | 22 | internal class ConvertTest() { 23 | 24 | // This test is not part of the test suite, it is designed for local debugging. 25 | // The @ignore is there to make sure it does not get included in a test suite for build purposes, the files / folder 26 | // it is debugging will not be in the repo. To run the actual test for debugging, comment the @Ignore out 27 | @Test 28 | @Ignore 29 | fun runConvert() { 30 | // root directory 31 | val jira = "some-test" 32 | val homeFolder = System.getProperty("user.home") 33 | val rootDirectory = "$homeFolder/ds-discovery/$jira" 34 | 35 | val p = java.nio.file.Paths.get(rootDirectory).toAbsolutePath() 36 | Convert().execute(p.toString()) 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /montecristo/src/main/kotlin/com/datastax/montecristo/model/versions/dse/DseV69X.kt: -------------------------------------------------------------------------------- 1 | package com.datastax.montecristo.model.versions.dse 2 | 3 | import com.datastax.montecristo.logs.LogEntry 4 | import com.datastax.montecristo.logs.Searcher 5 | import com.datastax.montecristo.logs.logMessageParsers.DseTombstoneWarningMessage 6 | import com.datastax.montecristo.logs.logMessageParsers.TombstoneWarningMessage 7 | import com.datastax.montecristo.model.logs.LogLevel 8 | import com.datastax.montecristo.model.versions.DatabaseVersion 9 | 10 | class DseV69X(versionIdentifier: String) : Dse6Base(versionIdentifier) { 11 | override fun supportsReadRepair(): Boolean { 12 | return false 13 | } 14 | override fun isSupported(): Boolean { 15 | return true 16 | } 17 | 18 | override fun latestRelease(): DatabaseVersion { 19 | return DatabaseVersion.latestDSE69() 20 | } 21 | 22 | override fun recommendedOSSettingsLink(): String { 23 | return "https://docs.datastax.com/en/dse/6.9/dse-dev/datastax_enterprise/config/configRecommendedSettings.html" 24 | } 25 | 26 | override fun searchLogForTombstones(searcher: Searcher, queryLimit: Int): List { 27 | return searcher.search("+Scanned +tombstone", LogLevel.WARN, queryLimit) 28 | .mapNotNull { DseTombstoneWarningMessage.fromLogEntry(it) } 29 | } 30 | 31 | override fun searchLogForBatches(searcher: Searcher, queryLimit: Int): List { 32 | return searcher.search ("+Batch +for +\"is of size\" ", LogLevel.WARN, queryLimit) 33 | } 34 | } -------------------------------------------------------------------------------- /montecristo/src/test/kotlin/com/datastax/montecristo/utils/MarkdownTableTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.utils 18 | 19 | import org.junit.Test 20 | import kotlin.test.assertEquals 21 | import kotlin.test.assertNotEquals 22 | import kotlin.test.assertTrue 23 | 24 | class MarkdownTableTest { 25 | @Test 26 | fun testRenderNoData() { 27 | val message = "No data found" 28 | val m = MarkdownTable("First", "Second").orMessage(message).toString() 29 | assertEquals(message, m) 30 | 31 | } 32 | 33 | @Test 34 | fun testSomeData() { 35 | val message = "No data found" 36 | val t = MarkdownTable("First", "Second").orMessage(message) 37 | t.addRow() 38 | .addField("test") 39 | .addField("field") 40 | 41 | val m = t.toString() 42 | 43 | 44 | assertNotEquals(message, m) 45 | assertTrue { m.contains("test|field") } 46 | } 47 | } -------------------------------------------------------------------------------- /montecristo/src/test/resources/fileLoaders/parsers/os/meminfo: -------------------------------------------------------------------------------- 1 | MemTotal: 32825216 kB 2 | MemFree: 6614680 kB 3 | MemAvailable: 23958376 kB 4 | Buffers: 316048 kB 5 | Cached: 16690092 kB 6 | SwapCached: 796 kB 7 | Active: 12244268 kB 8 | Inactive: 12859776 kB 9 | Active(anon): 5746580 kB 10 | Inactive(anon): 1940708 kB 11 | Active(file): 6497688 kB 12 | Inactive(file): 10919068 kB 13 | Unevictable: 14512 kB 14 | Mlocked: 1296 kB 15 | SwapTotal: 33431036 kB 16 | SwapFree: 33405180 kB 17 | Dirty: 544 kB 18 | Writeback: 0 kB 19 | AnonPages: 8110532 kB 20 | Mapped: 1098792 kB 21 | Shmem: 654492 kB 22 | Slab: 651748 kB 23 | SReclaimable: 394196 kB 24 | SUnreclaim: 257552 kB 25 | KernelStack: 24128 kB 26 | PageTables: 117316 kB 27 | NFS_Unstable: 0 kB 28 | Bounce: 0 kB 29 | WritebackTmp: 0 kB 30 | CommitLimit: 49843644 kB 31 | Committed_AS: 19580472 kB 32 | VmallocTotal: 34359738367 kB 33 | VmallocUsed: 0 kB 34 | VmallocChunk: 0 kB 35 | HardwareCorrupted: 0 kB 36 | AnonHugePages: 0 kB 37 | ShmemHugePages: 0 kB 38 | ShmemPmdMapped: 0 kB 39 | CmaTotal: 0 kB 40 | CmaFree: 0 kB 41 | HugePages_Total: 0 42 | HugePages_Free: 0 43 | HugePages_Rsvd: 0 44 | HugePages_Surp: 0 45 | Hugepagesize: 2048 kB 46 | DirectMap4k: 1355296 kB 47 | DirectMap2M: 32083968 kB 48 | DirectMap1G: 1048576 kB 49 | -------------------------------------------------------------------------------- /montecristo/src/test/kotlin/com/datastax/montecristo/model/sqlLiteMetricServerTest.kt: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright DataStax, Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.datastax.montecristo.model 18 | 19 | import com.datastax.montecristo.model.metrics.ServerMetricList 20 | import org.junit.Test 21 | import kotlin.test.assertEquals 22 | 23 | 24 | class sqlLiteMetricServerTest { 25 | @Test 26 | fun testHistogramServerList() { 27 | 28 | var metrics = ServerMetricList(mutableListOf(Pair("node1", 10.0), Pair("node1", 20.0))) 29 | assertEquals(20.0, metrics.max()) 30 | assertEquals(10.0, metrics.min()) 31 | assertEquals(15.0, metrics.average()) 32 | 33 | } 34 | // @Test 35 | // fun testCastToInt() { 36 | // var metrics : ServerMetricList = mutableListOf(Pair("node1", "10"), Pair("node1", "20")) 37 | // 38 | // var metrics2 : ServerMetricList = metrics.toInt() 39 | // assertEquals(10, metrics2.first().second) 40 | // 41 | // 42 | // } 43 | } --------------------------------------------------------------------------------