### Initialize Hydrolix CLI Source: https://docs.hydrolix.io/latest/self-managed/advanced-configuration/hdxcli/hdxcli-usage?q= Guides through the interactive setup process for the Hydrolix CLI, including profile configuration, user login, and optional Service Account setup. ```bash hdxcli init ``` ```bash $ hdxcli init No configuration found for your Hydrolix cluster. Let's create the 'default' profile to get you started. ----- Configuring Profile [default] ----- ? Enter the host address for the profile: host.hydrolix.dev ? Use TLS (https) for connection? Yes The configuration for 'default' profile has been created. Please login to profile 'default' (host.hydrolix.dev) to continue. Username: user@hydrolix.io Password for [user@hydrolix.io]: ----- Service Account Configuration ----- A Service Account can be configured for automated access. ? How would you like to authenticate for this profile? Create a new Service Account ? What is the name for the new Service Account? user_sa ? Select roles to assign: ['user_admin'] ? Enter token duration (for example, 30d, 1y) or leave blank for default (1 year): 180d Profile 'default' is now configured to use Service Account 'user_sa'. ----- End of Service Account Configuration ----- Configuration complete. You can now use hdxcli to manage your cluster. ``` -------------------------------- ### Examples for Adding HDXCLI Profiles Source: https://docs.hydrolix.io/latest/self-managed/advanced-configuration/hdxcli/hdxcli-configuration?q= Demonstrates how to start the interactive profile creation or add a profile non-interactively with hostname and scheme. ```bash ## Start the interactive guide to create a new profile hdxcli profile add my_profile ## Add a new profile non-interactively hdxcli profile add my_profile --hostname example.hydrolix.dev --scheme https ``` -------------------------------- ### Successful Session with Auth Token Source: https://docs.hydrolix.io/latest/exploring-data/query-interfaces/mysql-client Example of a successful connection and session start using an authorization token for authentication. ```bash $ mysql --host hostname.hydrolix.live --user '__api_token__' --port 9004 --password="$HDX_TOKEN" mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 15 Server version: 24.8.6.1-ClickHouse Copyright (c) 2000, 2025, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> ``` -------------------------------- ### Successful Initialization Log Example Source: https://docs.hydrolix.io/latest/self-managed/manage-a-cluster/secure-a-kubernetes-cluster/enable-tls/hydrolix-acme-client An example log output indicating successful ACME challenge and certificate generation. ```text Attempt 1/300: Routing not ready, retrying in 1s... External routing confirmed working! Ready to proceed with ACME challenge. Requesting a new certificate 2025/06/03 17:28:47 No key found for account username@example.com. Generating a P256 key. [ ... ] ``` -------------------------------- ### Install software-properties-common and wget Source: https://docs.hydrolix.io/latest/exploring-data/visualization-tools/grafana Installs software-properties-common for managing repositories and wget for downloading files. ```bash sudo apt-get install software-properties-common wget ``` -------------------------------- ### Linode Batch Import Example Source: https://docs.hydrolix.io/latest/self-managed/load-data/ingest-batch Example configuration for a batch import job using Linode object storage. ```APIDOC ## Batch Import with Linode ### Description This is an example configuration for a batch import job that ingests data from Linode object storage. ### Limitations - The Kubernetes cluster must use the same account as the Linode bucket. - Linode storage doesn't support autoingest. ### Request Body ```json { "type": "batch_import", "name": "job_sample_data", "description": "sample data on Linode", "settings": { "max_active_partitions": 576, "max_rows_per_partition": 33554432, "max_minutes_per_partition": 20, "source": { "settings": { "bucket_name": "mydatatoingest", "bucket_path": "/mypath", "region": "us-southeast-1", "cloud": "linode", "credential_id": "11111111-1111-1111-1111-111111111111" }, "table": "sample.data", "type": "batch", "transform": "mytransform" }, "regex_filter": "^s3://mydatatoingest/mypath/.*.gz" } } ``` ``` -------------------------------- ### Examples for Setting Default Project and Table Source: https://docs.hydrolix.io/latest/self-managed/advanced-configuration/hdxcli/hdxcli-configuration?q= Illustrates setting only the default project, and setting both the default project and table. ```bash ## Set the default project hdxcli set web_proj ## Set the default project and table hdxcli set web_proj dns_logs ``` -------------------------------- ### Traefik Service Details Example Source: https://docs.hydrolix.io/latest/exploring-data/visualization-tools/superset-integration?q= Example output from `kubectl get service/traefik`. The `EXTERNAL-IP` is crucial for setting up DNS A records. ```text NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE 8089/TCP 68m traefik LoadBalancer 10.64.14.42 34.66.136.134 80:31708/TCP,9000:32344/TCP 2m50s ``` -------------------------------- ### Traefik Service Output Example Source: https://docs.hydrolix.io/latest/self-managed/deploy-hydrolix/lke-getting-started/lke-deploy?q= Example output of the 'kubectl get service/traefik' command, showing service details including the EXTERNAL-IP. ```text NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE 8089/TCP 68m traefik LoadBalancer 10.64.14.42 34.66.136.134 80:31708/TCP,9000:32344/TCP 2m50s ``` -------------------------------- ### Run Hydrolix Data Exporter Example Source: https://docs.hydrolix.io/latest/self-managed/tutorials/data-export-guides/hydrolix-http-api-to-google-pubsub-in-go Command to execute the Go example program, providing necessary parameters for GCP project, Pub/Sub topic, Hydrolix URL, table, and authentication token. ```bash go run main.go \ --gcp_project \ --gcp_topic \ --hdx_url https:///query \ --hdx_table \ --hdx_token $HDX_TOKEN ``` -------------------------------- ### Install Vector on Ubuntu Source: https://docs.hydrolix.io/latest/managed/data-sources/ingest-integrations/journald-with-vector Installs the Vector agent on an Ubuntu system using the provided script and apt package manager. This also starts Vector as a service. ```bash curl -1sLf 'https://repositories.timber.io/public/vector/cfg/setup/bash.deb.sh' | sudo -E bash sudo apt-get install vector ``` -------------------------------- ### Example for Listing HDXCLI Profiles Source: https://docs.hydrolix.io/latest/self-managed/advanced-configuration/hdxcli/hdxcli-configuration?q= Shows the command to list all configured profiles. ```bash ## List all configured profiles hdxcli profile list ``` -------------------------------- ### Example TLS Secret Output Source: https://docs.hydrolix.io/latest/self-managed/manage-a-cluster/secure-a-kubernetes-cluster/enable-tls/hydrolix-acme-client This is an example of the output from the `kubectl get secret traefik-tls -o yaml` command, showing the structure and content of the TLS secret. ```yaml apiVersion: v1 data: tls.crt: someCertificateData tls.key: someCertificateData kind: Secret metadata: creationTimestamp: "2023-06-27T15:27:12Z" name: traefik-tls namespace: hydrolix resourceVersion: "32029846" uid: 33c06aa2-b81f-44a9-9123-c24e1af94bb5 type: kubernetes.io/tls ``` -------------------------------- ### Example for Showing HDXCLI Profile Details Source: https://docs.hydrolix.io/latest/self-managed/advanced-configuration/hdxcli/hdxcli-configuration?q= Shows how to view the configuration for the 'default' profile. ```bash ## Show the configuration for the 'default' profile hdxcli profile show default ``` -------------------------------- ### Active Window Override Example Source: https://docs.hydrolix.io/latest/self-managed/scale-cluster/autoscaler/scheduled-overrides An example of a scheduled override with a defined start and end time. This override is currently active, illustrating the limitation where updates may not apply immediately. ```yaml overrides: test-override: patch: howdy: doody scale_off: "true" timezone: America/Los_Angeles window: start: "2025-07-29T09:58:00Z" end: "2025-07-29T17:00:00Z" ``` -------------------------------- ### Example ACME Renewal Cron Job Output Source: https://docs.hydrolix.io/latest/self-managed/manage-a-cluster/secure-a-kubernetes-cluster/enable-tls/hydrolix-acme-client This is an example output for the `kubectl get cronjob` command, showing the 'acme-renewal' cron job configuration and its last schedule time. ```bash $ kubectl -n get cronjob NAME SCHEDULE SUSPEND ACTIVE LAST SCHEDULE AGE acme-renewal 0 2 * * SUN False 0 24h ``` -------------------------------- ### Example Local MinIO Server Configuration Source: https://docs.hydrolix.io/latest/release-notes/v4.19.1 An example of how to configure batch source settings for a local MinIO server, demonstrating the new multi-cloud compatible format. ```json { "bucket_name": "qe-datasets", "bucket_path": "/", "region": "antartica-central1", "endpoint": "http://minio", "cloud": "aws", "credential_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ``` -------------------------------- ### Start Fluent Bit Debug Docker Container Source: https://docs.hydrolix.io/latest/managed/data-sources/ingest-integrations/fluent-bit-integration?q= Run this command to start a Fluent Bit debug Docker container interactively. This is useful for initial setup and proof-of-concept deployments. ```bash docker run -ti cr.fluentbit.io/fluent/fluent-bit:latest-debug ``` -------------------------------- ### Local File Compression Example Source: https://docs.hydrolix.io/latest/self-managed/advanced-configuration/transforms-and-write-schema/format-options Shows how to compress a JSON file using gzip, bzip2, and zip sequentially on a local system. ```bash 1 2 3 4 5 6 7 8 $ gzip -c < data.json > data.json.gz $ bzip2 -c < data.json.gz > data.json.gz.bz2 $ echo data.json.gz.bz2 | zip --names-stdin data.json.gz.bz2.zip $ ls -lrt -rw-rw-r-- 1 user group 12655 Feb 26 06:30 data.json -rw-rw-r-- 1 user group 2100 Feb 26 06:31 data.json.gz -rw-rw-r-- 1 user group 2505 Feb 26 06:32 data.json.gz.bz2 -rw-rw-r-- 1 user group 2687 Feb 26 06:36 data.json.gz.bz2.zip ``` -------------------------------- ### Install ValidatingWebhookConfiguration with Fail Policy Source: https://docs.hydrolix.io/latest/self-managed/manage-a-cluster/k8s-config-validator?q= Installs the `ValidatingWebhookConfiguration` with `Failure Policy: Fail`. This command starts a webhook pod if necessary and patches the configuration. Use this to prevent invalid changes from being applied to the cluster. ```bash curl https://hkw.hydrolix.live/$HDX_VERSION/operator-resources?namespace=$HDX_NAMESPACE&validation-policy=fail \ | kubectl apply -f - ``` -------------------------------- ### Example ACME Renewal Cron Job Output Source: https://docs.hydrolix.io/latest/self-managed/manage-a-cluster/secure-a-kubernetes-cluster/enable-tls/hydrolix-acme-client?q= This is an example output from `kubectl get cronjob`, showing the schedule and status of the 'acme-renewal' cron job. It indicates when the job is set to run next. ```yaml NAME SCHEDULE SUSPEND ACTIVE LAST SCHEDULE AGE acme-renewal 0 2 * * SUN False 0 24h ``` -------------------------------- ### List all settings for a project Source: https://docs.hydrolix.io/latest/self-managed/advanced-configuration/hdxcli/hdxcli-resource-management Use this command to retrieve all configuration settings for a specified project. Ensure the project name is correctly provided. ```bash hdxcli project --project my_project settings ``` -------------------------------- ### Example Kibana Gateway Configuration with Sample Table Source: https://docs.hydrolix.io/latest/exploring-data/visualization-tools/kibana-gateway/kibana-automatic-installation?q= Demonstrates a configuration exposing `hydro.logs`, `sample_project.sample_table`, and `cloudflare.logs` tables, with `sample_project.sample_table` ignored from auto-discovery. ```yaml spec: kibana_gateway_config: projects: ["hydro", "sample_project", "cloudflare"] indexes: hydrologs: project: hydro table: logs sample_table: project: sample_project table: sample_table ignore: true cflogs: project: cloudflare table: logs ``` -------------------------------- ### Successful MySQL Authentication Source: https://docs.hydrolix.io/latest/exploring-data/query-interfaces/mysql-client Example of a successful connection and session start after authenticating with valid MySQL credentials. ```bash $ mysql --host hostname.hydrolix.live --user "$HDX_USERNAME" --port 9004 --password="$HDX_PASSWORD" mysql: [Warning] Using a password on the command line interface can be insecure. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 16 Server version: 24.8.6.1-ClickHouse Copyright (c) 2000, 2025, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> ``` -------------------------------- ### Example HDXCLI Init Session Output Source: https://docs.hydrolix.io/latest/self-managed/advanced-configuration/hdxcli/hdxcli-configuration This is a sample of the interactive session when running 'hdxcli init'. It shows the prompts for host address, TLS usage, and service account configuration. ```bash $ hdxcli init No configuration found for your Hydrolix cluster. Let's create the 'default' profile to get you started. ----- Configuring Profile [default] ----- ? Enter the host address for the profile: host.hydrolix.dev ? Use TLS (https) for connection? Yes The configuration for 'default' profile has been created. Please login to profile 'default' (host.hydrolix.dev) to continue. Username: user@hydrolix.io Password for [user@hydrolix.io]: ----- Service Account Configuration ----- A Service Account can be configured for automated access. ? How would you like to authenticate for this profile? Create a new Service Account ? What is the name for the new Service Account? user_sa ? Select roles to assign: ['user_admin'] ? Enter token duration (for example, 30d, 1y) or leave blank for default (1 year): 180d Profile 'default' is now configured to use Service Account 'user_sa'. ----- End of Service Account Configuration ----- Configuration complete. You can now use hdxcli to manage your cluster. ``` -------------------------------- ### Install ValidatingWebhookConfiguration with Ignore Policy Source: https://docs.hydrolix.io/latest/self-managed/manage-a-cluster/k8s-config-validator?q= Installs the `ValidatingWebhookConfiguration` with `Failure Policy: Ignore`. This command starts a webhook pod if necessary and patches the configuration. Use this to log configuration errors as warnings without blocking changes. ```bash curl https://hkw.hydrolix.live/$HDX_VERSION/operator-resources?namespace=$HDX_NAMESPACE&validation-policy=ignore \ | kubectl apply -f - ``` -------------------------------- ### PromQL Example Output for Image Overrides Source: https://docs.hydrolix.io/latest/self-managed/manage-a-cluster/independent-container-versioning?q= Example output from a PromQL query showing details of a pod with an image override. ```text kube_pod_annotations{ annotation_hydrolix_io_image_override="turbine", annotation_hydrolix_io_service="merge-peer", app="kube-state-metrics", deployment_id="example-cluster", exported_namespace="example-namespace", instance="10.2.3.164:8080", job="presence", namespace="example-namespace", pod="merge-peer-iii-5cbb8c794b-6b5qf", port_name="kube-state-metrics", service="kube-state-metrics", uid="17ee4f19-b25c-43e3-ab66-67f972a4f6b8"} ``` -------------------------------- ### Example License Key Configuration Source: https://docs.hydrolix.io/latest/exploring-data/visualization-tools/kibana-gateway/design-and-config Provide a commercial license key in the 'licenseKey' field to use 'hydrolix' or 'clickhouse' backend connectors. ```yaml licenseKey: ZXlKcGJuTjBZV3hz... ``` -------------------------------- ### Initialize HDXCLI Configuration Source: https://docs.hydrolix.io/latest/self-managed/advanced-configuration/hdxcli/hdxcli-configuration Run this command once to create the initial configuration file and set up your 'default' profile. It will exit with an error if a configuration already exists. ```bash hdxcli init [OPTIONS] ``` -------------------------------- ### Create Role Source: https://docs.hydrolix.io/latest/self-managed/advanced-configuration/hdxcli/hdxcli-security-and-access?q= Creates a new role. Roles can be created with specific permissions and scope types, or interactively for a guided setup. ```bash hdxcli role create my_read_role --permission read_table ``` ```bash hdxcli role create my_project_role --scope-type project --scope-id --permission add_table ``` ```bash hdxcli role create my_interactive_role --interactive ``` -------------------------------- ### Expected Pod Status Output Source: https://docs.hydrolix.io/latest/exploring-data/visualization-tools/kibana-gateway/kibana-automatic-installation?q= Example output showing the expected 'Running' status for Elasticsearch, Kibana, and Kibana Gateway pods after installation. ```text elasticsearch-es-default-0 1/1 Running 3 (74m ago) 7h25m kibana-kb-85bdfdffd6-6x9n7 1/1 Running 0 7h25m kibana-gateway-596b76b665-fhbpz 1/1 Running 0 7h25m ``` -------------------------------- ### Example for Editing an HDXCLI Profile Source: https://docs.hydrolix.io/latest/self-managed/advanced-configuration/hdxcli/hdxcli-configuration?q= Demonstrates how to launch the interactive editor for the 'default' profile. ```bash ## Start the interactive editor for the 'default' profile hdxcli profile edit default ``` -------------------------------- ### Get Conditions for a Healthy Deployment Source: https://docs.hydrolix.io/latest/self-managed/observability/platform-observability/cluster-health-status Inspect the status conditions of a Kubernetes Deployment to understand its health. This example shows conditions for a healthy 'intake-head' Deployment. ```bash kubectl get deploy intake-head -oyaml | yq .status.conditions ``` -------------------------------- ### Migrate Project with Tables and Transforms Source: https://docs.hydrolix.io/latest/self-managed/advanced-configuration/hdxcli/hdxcli-usage?q= This example demonstrates migrating a project named 'hydrolix' from the 'default' profile to the 'test' profile, creating a new project 'new_hydrolix'. It includes the project's tables and transforms by default. ```bash hdxcli --profile default project --project hydrolix migrate new_hydrolix --target-profile test ``` -------------------------------- ### Export KUBECONFIG and Get Nodes Source: https://docs.hydrolix.io/latest/self-managed/deploy-hydrolix/lke-getting-started/lke-prepare For easier access, export the configuration filename in the KUBECONFIG environment variable. This example assumes you downloaded a hdx-company-kubeconfig.yaml file. ```bash export KUBECONFIG=${PWD}/hdx-company-kubeconfig.yaml kubectl get nodes ``` -------------------------------- ### Configure Splunk UI Result Limit Source: https://docs.hydrolix.io/latest/exploring-data/visualization-tools/hydrolix-search-for-splunk?q= Modify the `limits.conf` file in your Splunk installation to increase the maximum number of events displayed in the UI. This example sets the limit to 100,000. ```ini [search] max_events_per_bucket = 100000 ``` -------------------------------- ### Run Java Example with Maven Source: https://docs.hydrolix.io/latest/exploring-data/query-interfaces/jdbc-driver-to-hydrolix Execute the Hydrolix JDBC example using Maven. Set the HDX_HOSTNAME and HDX_TOKEN environment variables before running. ```bash export HDX_HOSTNAME=mycluster.hydrolix.live export HDX_TOKEN=eyJhbGciOi... mvn exec:java -Dexec.mainClass=HydrolixJdbcExample ``` -------------------------------- ### Example for Unsetting Default Project and Table Source: https://docs.hydrolix.io/latest/self-managed/advanced-configuration/hdxcli/hdxcli-configuration?q= Shows the command to remove the default project and table settings. ```bash ## Unset the default project and table hdxcli unset ``` -------------------------------- ### Grouping Timeseries Data by Minute Intervals Source: https://docs.hydrolix.io/latest/self-managed/tutorials/working-with-metrics/timeseries-functions Group data by the start of each minute using `toStartOfMinute`. This example demonstrates its use in a `GROUP BY` clause. The cURL command executes the query. ```SQL SELECT max(usage_guest) FROM sample.metrics WHERE (timestamp BETWEEN '2016-01-01 00:00:00' AND '2016-01-01 04:00:00') GROUP BY toStartOfMinute(timestamp) AS five ORDER BY five ``` ```bash curl --data-binary @- https://try3.hydrolix.live/query <