diff --git a/.DS_Store b/.DS_Store index 14c51e0..ef618e7 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.gitallowed b/.gitallowed new file mode 100644 index 0000000..e69de29 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..04f0c5c --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.DS_Store +.venv +cdk.context.json +.vscode \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cc2ad2..d31f561 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.2] - 2024-09-19 +### Added +- Updated applicaiton code and EKS depencies to latest supported. Removed AWS CodeCommit references. Upgreded to CDK V2. Added helper scripts. Updated readme for better usability ## [1.0.1] - 2021-07-22 ### Added diff --git a/NOTICE.md b/NOTICE.md index 314c860..4e8924e 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -1,8 +1,8 @@ -Amazon Bidder CodeKit Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. +AWS RTB CodeKit Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. ==================================================================================================== -Amazon Bidder CodeKit contains the following third-party software/licensing: +AWS RTB CodeKit contains the following third-party software/licensing: # Bidder application @@ -18,7 +18,7 @@ Amazon Bidder CodeKit contains the following third-party software/licensing: ==================================================================================================== -Amazon Bidder CodeKit includes the following third-party software/licensing: +AWS RTB CodeKit includes the following third-party software/licensing: # Bidder application diff --git a/README.md b/README.md index 87ca3d4..1912dcb 100644 --- a/README.md +++ b/README.md @@ -1,51 +1,65 @@ -# RTB Codekit Deployment Guide +# Guidance for Building a Real Time Bidder for Advertising on AWS -**Important**: This Guidance requires the use of AWS CodeCommit, which is no longer available to new customers. Existing customers of AWS CodeCommit can continue using and deploying this Guidance as normal. +### RTB Code Kit Deployment Guide +# Guidance for Building a Real Time Bidder for Advertising on AWS + +### RTB Code Kit Deployment Guide ## Introduction -Real-time advertising platforms running bidding, ad serving, and verification workloads operate at ultra-low latency with throughput in the millions of transactions per second —24 hours a day. The scale of advertising technology (ad tech) platform request volume is so large that customers often measure infrastructure costs on unit basis per billion requests. Infrastructure costs for compute, databases, and networking also directly affect profit margins in ad tech—creating a strong incentive for customers to optimize price-performance. +Real-time advertising platforms operate round-the-clock, processing millions of transactions, running bidding, ad serving, and verification workloads at ultra-low latency and high throughput. + +In this industry, expenses associated with infrastructure costs such as compute, databases, and networking significantly impact profit margins. Consequently, ad tech firms are driven to constantly maximize the price-performance of their platforms. -The Real-Time Bidding on AWS Solution is a deployable reference architecture demonstrating the "art of the possible" and enabling DSPs to jumpstart development of innovative smart bidding services. Using the Real-Time Bidding on AWS Solution, demand side partners can rapidly deploy and build upon an open source architecture to enable the fast assessment of ad opportunities at scale, and focus on the bid assessment rather than non-differentiated processing logistics. +This AWS Solution, "Guidance for Building a Real Time Bidder for Advertising on AWS" presents a deployable reference architecture that leverages open-source technologies to showcase the "art of the possible" in the advertising space. This blueprint empowers demand-side platforms (DSP) to develop advanced, innovative, and smart bidding services. -The Real-Time Bidder Solution on AWS consist of 5 modules: +The Real-Time Bidder Solution on AWS consists of 5 modules: -1. **Data generator** to generate synthetic data for the device, campaign, budget, and audience. The size of each table can be defined in the configuration file, it is recommended that 1 Bn devices be generated for the devices table, 1 million campaigns and associated budgets, and one hundred thousand audiences. +1. **Data generator**: Generates synthetic data for the device, campaign, budget, and audience. The size of each table can be defined in the configuration file, it is recommended that one billion devices be generated for the devices table, one million campaigns and associated budgets, and one hundred thousand audiences. -2. **Load generator** to generate artificial bid requests (based on the OpenRTB 2.5 or OpenRTB 3.0 standard). +2. **Load generator**: Generates artificial bid requests (based on the OpenRTB 2.5 or OpenRTB 3.0 standard). -3. **Bidder** to receive the bid requests, parse the bid requests, find the device in the device table and associated meta data, select the best fitting campaign, determine the price to bid for the ad opportunity, constrict the bid request response, return the bid request response, and write the bid request and bid request response to a data pipeline. +3. **Bidder**: Receives and parses bid requests, searches for the device and associated metadata in the device table, selects the best fitting campaign, determines the bid price for the ad opportunity, constructs the bid request/response, and writes the bid request/response to a data pipeline. -4. **data repository** for the device, campaign, budget, and audience data. You can choose from DynamoDB or Aerospike. +4. **Data repository**: Database for storing device, campaign, budget, and audience data. Supports either DynamoDB or Aerospike. -5. **Data Pipeline** that receives, aggregates and writes the bid request and the bid request response to a data repository, and /6 a set of tools to ingest the metrics generated by the bidder and display the results for evaluation. +5. **Data Pipeline**: Receives, aggregates and writes the bid request and response to a data repository. Includes tools to ingest the metrics generated by the bidder and displays the results for evaluation. -6. **Monitoring Tools**, Grafana and Prometheus on the EKS cluster to collect and display the application logs such as the bid requests per second and latency. +6. **Monitoring Tools**: Uses Grafana and Prometheus on Amazon Elastic Kubernetes Service (EKS) to collect and display application logs such as the bid requests per second and latency. ## Prerequisites -1. You need the following to be installed on your local machine to access the EKS cluster and Grafana Dashboards +1. Python 3 -* [AWS CLI V2](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) -* [AWS CDK](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html#:~:text=The%20actual%20package%20name%20of%20the%20main%20CDK%20package%20varies%20by%20language.) +2. Ensure the AWS CLI and AWS CDK are installed on your local machine. These are used to access the EKS cluster and Grafana Dashboards: + * [AWS CLI V2](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) + * [AWS CDK](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html#:~:text=The%20actual%20package%20name%20of%20the%20main%20CDK%20package%20varies%20by%20language.) -2. As part of the deployment the solution will also create an isolated VPC and Cloud9 instance to access EKS clsuter and Grafana dashboards. You need to install the following on the cloud9 instances to run the benchmarks. -* [Helm 3.8.2](https://helm.sh/) -* [kubectl 1.21.0](https://kubernetes.io/docs/tasks/tools/#kubectl) -* [JQ](https://stedolan.github.io/jq/download/) +3. The following packages are required and can be installed using the helper script [client-setup.sh](./client-setup.sh): + * [Helm 3.8.2](https://helm.sh/) + * [kubectl 1.21.0](https://kubernetes.io/docs/tasks/tools/#kubectl) + * [JQ](https://stedolan.github.io/jq/download/) -3. On the AWS account that you will be deploying this kit you will need an IAM User with - +4. Create an IAM user with the following permissions in the AWS account that you will be deploying this solution: + * Administrator and Programmatic access + * GitHub repository creation and write access -* Administrator and Programmatic access -* Git security credentials. -* If you already are using cloud9 in the AWS Account you also have AWSCloud9SSMInstanceProfile policy in your IAM Policy and you don't have to create it again. Comment AWSCloud9SSMInstanceProfile object in deployment/infrastructure/templates/cloud9.yaml file (line number 40) +5. The [CDK code](./cdk/pipeline) deploys a code pipeline and automates the deployment of the components. The code pipeline requires a supported Git repository (GitHub or Bitbucket) as the source. In this example we are using GitHub. Follow these steps to create a GitHub repo: + 1. Create a new GitHub repo as a fork of the opensource. Follow the instructions [here](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) + 2. Create an OAuth Personal Access Token with read access to the repository and read/write access to Webhooks. Follow instructions [here](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-fine-grained-personal-access-token). -### 4. Service Limits - +6. Create a new secret in AWS Secrets Manager via the AWS Console to store the GitHub Personal Access Token (PAT) from the step above. Ensure you are in the correct region: + 1. Login to the AWS console and navigate to AWS Secrets Manager. + 2. Select `Store a new secret`, click `Other type of secret`, use the `plaintext` option and save the GitHub PAT from the step above. + >NOTE Don’t use the key value pair nor the Json format. + 3. Enter a name for the secret. This name is required in the cdk context file later on. + 4. Leave the rest as default and store the secret. -You can increase the following limits via service quota portal in AWS Console. -* DynamoDB table Read Capacity Unit (RCU) limit should be increased to 150,000 RCU's from deafult 40,000 RCU's -* Kinesis shards limit should be increased to 2048. -* Code-kit will be leveraging Graviton Spot instances M6g and C6g and so make sure you have enough spot cores available for your account. You can quickly verify this via service quotas portal in AWS Console. Increase the limit to 200 cores. +### Service Limits + +Increase the following service limits via Service Quotas section in AWS Console. +* DynamoDB table Read Capacity Unit (RCU) limit should be increased to 150,000 RCU's from default 40,000 RCU's. The limit is called `Table-level read throughput limit` under the `Amazon DynamoDB` service quota. +* Kinesis shards limit should be increased to 2048. The limit is called `Shard per Region` under `Amazon Kinesis Data Streams` service quota. ## Architecture Diagram @@ -53,186 +67,240 @@ You can increase the following limits via service quota portal in AWS Console. ## Deployment -1. Download the code as Zip file and unzip the file `aws-real-time-bidder` -2. Open terminal on your loacal machine and configure your AWS credentials (Secret ID and Token), region and output using the following command -``` -aws configure -``` -3. navigate to `aws-real-time-bidder/cdk/pipeline` on your terminal or IDE and edit `cdk.json` file -``` -cd cdk/pipeline -vi cdk.json -``` - -4. Update the `AWS_ACCOUNT_ID`, `RTBKIT_ROOT_STACK_NAME`,`RTBKIT_VARIANT` (DynamoDB/Aerospike) variables on the `cdk.json` file available in the above mentioned location (in step 3) - -5. Check if python3 and python3 virtual environment is installed on your machine if not install python3 -``` -sudo apt-get install python3 -sudo apt-get install python3.8-venv -python3 --version -``` -6. create python3 virtual environment and install the requirements and boto3 libraries. -``` -python3 -m venv .venv -source .venv/bin/activate -pip3 install -r requirements.txt -pip3 install aws-cdk.aws-codecommit aws-cdk.aws-codebuild \ - aws-cdk.aws-codepipeline aws-cdk.aws_codepipeline_actions aws-cdk.pipelines -``` -7. Deploy the CodeCommit, CodeBuild and CodePipeline using CDK by running the following commands -``` -cdk bootstrap -cdk deploy -``` -8. CDK will deploy the resources as shown below. - -![CDK Deployment](./images/CDKDeployment-2.png) -![CDK Deployment](./images/CDKDeployment.png) - -9. On successful deployment you will see as following -``` -✅ RTBPipelineStack -``` -10. Login to AWS Console and navigate to AWS CodeCommit console. From the console get the clone URL as shown in the figure below. (your AWS user account should have git credentials in order to clone or update repo. You can find more information [here](https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html)) - -![Clone Repo](./images/Clonerepo.png) - -``` -git clone -``` - -11. You have clone the empty repo that was created as part of the CDK deployment. Now, copy the contents of the downloaded repo in step 1 to the new cloned codecommit repo and commit the changes. - -``` -git add . -git commit -m "initial commit" -git push -``` -12. Now your pipeline will be triggered and the Real-Time-Bidding Solution will start deploying on your AWS Account and eventually you will see that the CodePipeline is sucessful. - -![Build Success](./images/buildsuccess.png) - -13. Once the deployment is completed go to the cloudformation console and navigate to root stack (this will be the stack with name that you have provided in cdk.json file in step 4). Go to Outputs tab and copy `ApplicationStackName`, `ApplicationStackARN`, `EKSAccessRoleARN`, `EKSWorkerRoleARN`, `Cloud9IDE-URL`, and `Cloud9EnvID`. We will be using them in next steps. - -14. As part of the deployment pipeline, you have also deployed a cloud9 instance. Run the following command to enable access to the Cloud9 instance. you can find more info [here](https://docs.aws.amazon.com/cloud9/latest/user-guide/share-environment.html) -``` -aws cloud9 create-environment-membership --environment-id --user-arn USER_ARN --permissions PERMISSION_LEVEL -``` ->Note: If the cloud9 deployment fails or doesnt create an instance, use the [cloud9.yaml file](./deployment/infrastructure//templates/cloud9.yaml) to manually deploy the cloud9 instance - -15. Access the Cloud9 IDE using the URL that you have copied from step 13. Deploy the pre-requisits (`Helm`, `Kubectl`and `jq`) on the Cloud9 Instance as mentioned in the prereqisits session. ->Tip: Commands for steps 15 - 26 are inlcuded in a shell script [cloud9-setup.sh](./cloud9-setup.sh) and is accessible from the code repo copy that gets pulled down automatically when you lauch the Cloud9 instance created by the stack. Navigate to the directory and change the script permissions `chmod 700 cloud9-setup.sh` before executing the script. -16. In the cloud9 terminal, clone the CodeCommit repo as you have done in step 10. - -17. On terminal, navigate to the repository folder and run the following commands. The follwing commands will set the variables in your terminal which are used to connect to EKS cluster and run benchmarks - -``` -export AWS_ACCOUNT= - -export AWS_REGION= - -export ROOT_STACK= - -export APPLICATION_STACK_NAME=`aws cloudformation list-exports --query "Exports[?Name=='ApplicationStackName'].Value" --output text` - -export CODEBUILD_STACK_NAME=`aws cloudformation describe-stacks --stack-name ${ROOT_STACK} --output json | jq '.Stacks[].Outputs[] | select(.OutputKey=="CodebuildStackARN") | .OutputValue' | cut -d/ -f2` - -export EKS_WORKER_ROLE_ARN=`aws cloudformation list-exports --query "Exports[?Name=='EKSWorkerRoleARN'].Value" --output text` - -export EKS_ACCESS_ROLE_ARN=`aws cloudformation list-exports --query "Exports[?Name=='EKSAccessRoleARN'].Value" --output text` - -export STACK_NAME=$ROOT_STACK -``` -18. Now, run the following command to assume EKS_ACCESS_ROLE to connect to the EKS cluster. -``` -CREDS_JSON=`aws sts assume-role --role-arn $EKS_ACCESS_ROLE_ARN \ - --role-session-name EKSRole-Session --output json` -``` ->Note: You may need to manually configure AWS CLI credentials using `aws configure` if the temporary cloud9 tokens doesnt work. -19. As output of above command you will get AccessKeyId, SecretAccessKey, and SessionToken. Copy them and pass them in to variables as shown below. -``` -export AWS_ACCESS_KEY_ID=`echo $CREDS_JSON | jq '.Credentials.AccessKeyId' | tr -d '"'` -export AWS_SECRET_ACCESS_KEY=`echo $CREDS_JSON | jq '.Credentials.SecretAccessKey' | tr -d '"'` -export AWS_SESSION_TOKEN=`echo $CREDS_JSON | jq '.Credentials.SessionToken' | tr -d '"'` -CREDS_JSON="" -``` -20. Now call the make eks@grant-access target file to access EKS cluster by using the command below (This command has to be run in the code repository folder in terminal). -``` -make eks@grant-access -``` -21. We now have creds to login to EKS cluster. Unset the EksAccessRole using below command. -``` -unset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY AWS_SESSION_TOKEN -``` -22. Run the following command to connect to EKS cluster. -``` -make eks@use -``` -23. The following command will get you the pods in cluster and you must see the pods as shown in the screenshot below. -``` -kubectl get pods -``` -![Clone Repo](./images/getpods.png) - -24. The below command will clean up the existing load generator container that was deployed during the initial deployment. You need to run this command everytime you want to run a new benchmark. -``` -make benchmark@cleanup -``` - -25. Trigger the benchmark by initiating the load-generator along with the parameters. -``` -make benchmark@run TIMEOUT=100ms NUMBER_OF_JOBS=1 RATE_PER_JOB=200 NUMBER_OF_DEVICES=10000 DURATION=500s -``` -_You can supply following parameters to load-generator and perform benchmarks_ -``` -TIMEOUT=100ms # Request timeout (default 100ms) -DURATION=500s # duration of the load generation -RATE_PER_JOB=5000 # target request rate for the load generator -NUMBER_OF_DEVICES=10 # number of device IFAs to use in bid request -NUMBER_OF_JOBS=1 # number of parallel instances of the load generator -SLOPE=0 # slope of requests per second increase (zero for a constant rate; see ) -ENABLE_PROFILER=1 # used to start profiling session, leave unset to disable -``` -26. Once the load-generator is triggered you can run the following port-forward command to connect to Grafana Dashboard. -``` -kubectl port-forward svc/prom-grafana 8080:80 -``` -27. On your cloud9 instance click and preview button on the top to open a browser window/tab and access Grafana Dashboard. Use the following credentials to login (Turn off enhanced tracking off if you are using Firefox) - -``` -username: admin -Password: prom-operator -``` - -![Clone Repo](./images/Grafanalogin.png) - -28. Once you login, click on the dashboard button on the left hand menu and select manage as shown in the figure below. - -![Clone Repo](./images/managedashboards.png) - -29. Search and access 'bidder' dashboard from the list. - -![Clone Repo](./images/bidderdashboard.png) - -30. You will see the bid request that are being generated on the right hand side and latency on the left hand side of the dashboard as shown in the figure below. - -![Clone Repo](./images/benchmarksresults.png) +1. Clone this repo to your local machine. +2. Open the terminal on your local machine and configure your AWS credentials profile (Secret ID and Token), region and output using the following command: + ``` + aws configure --profile rtb + ``` +3. Run the following command to setup to connection from AWS CodeBuild on your AWS account to the GitHub repo: + ``` + aws codebuild import-source-credentials --server-type GITHUB --auth-type PERSONAL_ACCESS_TOKEN --token --profile rtb + ``` + You should receive a response similar to the following: + ``` + { + "arn": "arn:aws:codebuild:::token/github" + } + ``` +4. Navigate to `aws-real-time-bidder/cdk/pipeline` in your terminal or IDE and copy `cdk.context.json.example` file to `cdk.context.json`: + ``` + cd cdk/pipeline + cp cdk/pipeline/cdk.context.json.example cdk/pipeline/cdk.context.json + ``` + +5. Update the `GITHUB_TOKEN_SECRET_ID`,`ROOT_STACK_NAME`,`STACK_VARIANT` (DynamoDB/Aerospike) and variables on the `cdk.context.json`: + ``` + { + "dev": { + "REPO_BRANCH":"main", + "GITHUB_TOKEN_SECRET_ID": "rtbkit-github-token" #-- AWS SecretManager secret name + }, + "shared": { + "ROOT_STACK_NAME": "aws-rtbkit", + "STACK_VARIANT": "DynamoDB", #-- [DynamoDB|Aerospike] + "REPO_OWNER":"", #-- Owner of the fork repo + "REPO_NAME":"" #-- Name of the fork repo + } + } + ``` +6. Check if python3 and the python3 virtual environment are installed on your machine if not install python3: + ``` + sudo apt-get install python3 + python3 --version + ``` +7. Create a python3 virtual environment and install the requirements and boto3 libraries: + ``` + python3 -m venv .venv + source .venv/bin/activate + pip3 install -r requirements.txt + ``` +8. Deploy the CDK stack: + ``` + cdk bootstrap --profile rtb + cdk deploy --profile rtb + ``` +9. CDK will deploy the resources as shown below: + + ![CDK Deployment](./images/CDKDeployment-2.png) + ![CDK Deployment](./images/CDKDeployment.png) + +10. On successful deployment you will see as following + ``` + ✅ RTBPipelineStack + ``` + +11. After the CDK deployment is complete, a CodePipeline will start and deploy the `Real-Time-Bidding Solution` in your AWS Account using CloudFormation. This will take approximately thirty minutes. Once successful you will see: + + ![Build Success](./images/buildsuccess.png) + +12. Open AWS console and navigate to EKS service. Locate the cluster deployed by the stack. Navigate to Add-ons tab and install the Amazon EBS CSI Driver add on: + > **IMPORTANT**: Select `Optional configuration schema` and click select `Override` for the `Conflict resolution method` + + ![EKS Add on](./images/eks-addon.png) + +13. Once the deployment is completed go to the CloudFormation console and navigate to root stack (this will be the stack with name that you have provided in cdk.json file in step 4). Go to Outputs tab and copy `ApplicationStackName`, `ApplicationStackARN`, `EKSAccessRoleARN`, `EKSWorkerRoleARN`. We will be using them in the following steps. + +14. Ensure the pre-requisites (`Helm`, `Kubectl` and `jq`) are installed on the local/client machine as per the pre-requisites section above. + > Tip: The pre-requisites can be installed using the shell script [client-setup.sh](./client-setup.sh). Navigate to the root directory and change the script permissions `chmod 700 client-setup.sh` before running the script. + + >NOTE: Commands for steps 15 - 22 are included in a shell script [run-benchmark.sh](./run-benchmark.sh). Navigate to the directory and change the script permissions `chmod 700 client-setup.sh` if required before running the script. + +15. Open a command terminal in your local/client machine, navigate to the repository folder and run the following commands. The following commands will set the variables in your terminal which are used to connect to EKS cluster and run benchmarks: + + >NOTE: Ensure you specify the correct `--profile` and `--region` in the commands below + + ``` + export AWS_ACCOUNT= + + export AWS_PROFILE= + + export AWS_REGION= + + export ROOT_STACK= + + export APPLICATION_STACK_NAME=`aws cloudformation list-exports --query "Exports[?Name=='ApplicationStackName'].Value" --output text` + + export CODEBUILD_STACK_NAME=`aws cloudformation describe-stacks --stack-name ${ROOT_STACK} --output json | jq '.Stacks[].Outputs[] | select(.OutputKey=="CodebuildStackARN") | .OutputValue' | cut -d/ -f2` + + export EKS_WORKER_ROLE_ARN=`aws cloudformation list-exports --query "Exports[?Name=='EKSWorkerRoleARN'].Value" --output text` + + export EKS_ACCESS_ROLE_ARN=`aws cloudformation list-exports --query "Exports[?Name=='EKSAccessRoleARN'].Value" --output text` + + export STACK_NAME=$ROOT_STACK + ``` +16. Now, run the following command to assume EKS_ACCESS_ROLE to connect to the EKS cluster: + ``` + CREDS_JSON=`aws sts assume-role --role-arn $EKS_ACCESS_ROLE_ARN \ + --role-session-name EKSRole-Session --output json` + ``` + >Note: You may need to manually configure AWS CLI credentials using `aws configure` if the temporary tokens don’t work. + +17. Output of above command you will give you AccessKeyId, SecretAccessKey, and SessionToken. Run the following command to export them to environment variables: + ``` + export AWS_ACCESS_KEY_ID=`echo $CREDS_JSON | jq '.Credentials.AccessKeyId' | tr -d '"'` + export AWS_SECRET_ACCESS_KEY=`echo $CREDS_JSON | jq '.Credentials.SecretAccessKey' | tr -d '"'` + export AWS_SESSION_TOKEN=`echo $CREDS_JSON | jq '.Credentials.SessionToken' | tr -d '"'` + CREDS_JSON="" + ``` +18. Now run the `make` command to access the EKS cluster by: + >NOTE: This command has to be run from the root folder of the code repository: + + ``` + make eks@grant-access + ``` + +19. Run the following command to connect to EKS cluster: + ``` + make eks@use + ``` + +20. Run the following command to list the pods in cluster. You should see the pods as shown in the screenshot below. + ``` + kubectl get pods + ``` + + ![Get Pods](./images/getpods.png) + +21. The below command will clean up the existing load generator container that was deployed during the initial deployment. You need to run this command every time you want to run a new benchmark. Use the script [run-benchmark.sh](./run-benchmark.sh) that automates 21-22. + ``` + make benchmark@cleanup + ``` + +22. Start the benchmark by initiating the load-generator along with the parameters. + ``` + make benchmark@run TIMEOUT=100ms NUMBER_OF_JOBS=1 RATE_PER_JOB=200 NUMBER_OF_DEVICES=10000 DURATION=500s + ``` + _You can supply following parameters to load-generator and perform benchmarks_ + ``` + TIMEOUT=100ms # Request timeout (default 100ms) + DURATION=500s # duration of the load generation + RATE_PER_JOB=5000 # target request rate for the load generator + NUMBER_OF_DEVICES=10 # number of devices IFAs to use in bid request + NUMBER_OF_JOBS=1 # number of parallel instances of the load generator + SLOPE=0 # slope of requests per second increase (zero for a constant rate; see ) + ENABLE_PROFILER=1 # used to start profiling session, leave unset to disable + ``` + +23. Once the load-generator is started you can run the following port-forward command to connect to Grafana Dashboard. + ``` + kubectl port-forward svc/prom-grafana 8080:80 + ``` + +24. On your local/client instance open the URL [localhost:8080](http://localhost:8080) access Grafana Dashboard. +Use the following credentials to login (Turn off enhanced tracking if you are using Firefox) + + ``` + username: admin + Password: prom-operator + ``` + + ![Grafana login](./images/aws-rtb-grafana-login.png) + +25. Once you login, click on the dashboard button on the left hamburger menu and select manage as shown in the figure below. + + ![Dashboards](./images/aws-rtb-grafana-dashboards.png) + +26. Search and access 'bidder' dashboard from the list. + + ![Bidder](./images/aws-rtb-grafana-bidder.png) + +27. You will see the bid request that are being generated on the right side and latency on the left side of the dashboard as shown in the figure below. + + ![Benchmark](./images/benchmarksresults.png) The metrics include: * Bid requests generated * Bid requests received * No Bid responses -* Latency on 99, 95 and 90 pecentile +* Latency on 99, 95 and 90 percentiles -This benchmarks will help to demonstrate that the AdTech Real-time-bidder application performace on AWS Graviton instances. +These benchmarks help demonstrate the Real-time-bidder application performance on AWS Graviton instances. +>IMPORTANT : After running the benchmark delete the stack to avoid incurring AWS cloud costs -# Notes -* You can disable the data pipeline by setting KINESIS_DISABLE: "ture" in deployment/infrastructure/charts/bidder/values.yaml file -* We have used unsafe pointers to optimise the heap allocation and are not converting the pointer types in the code. If this code is used in production, we strongly recommand you to look at you current code and set the pointer type in ./apps/bidder/code/stream/producer/batch_compiler.go file. -* For the ease of deployment, we have pre-configured user credentials for Grafana Dashboard. This is not a best practice and we strongly recommand you to configure access via AWS IAM/SSO. (./deployment/Infrastructure/deployment/prometheus/prometheus-values.yaml, ./tools/benchmark-utils/function.sh) -* Since CloudTrail is enabled on the AWS account by default. we strongly recommand not to disable it. We have not made any cloudtrail configuration on the codekit to enable it if it is disabled. ->IMPORTANT : Executing the bench mark, collecting data and deleting the stack is recommended to keep costs under control +>TIP: You can also change the DynamoDB and kinesis configurations to use on-demand compute instead of provisioned. This will reduce the cost of running the resources in the stack. In addition to this go to EKS and set the max and desired count of node in all node groups to 0. This will automatically terminate all the running EC2 instances launched by the stack. These two changes could reduce the running cost to 1/10th. As of June 2024, the average running cost of the stack with basic configuration is around $800/day in us-west-2 +# Notes +* You can disable the data pipeline by setting KINESIS_DISABLE: "true" in deployment/infrastructure/charts/bidder/values.yaml file +* We have used unsafe pointers to optimize the heap allocation and are not converting the pointer types in the code. If this code is used in production, we strongly recommend you to look at your current code and set the pointer type in ./apps/bidder/code/stream/producer/batch_compiler.go file. +* For the ease of deployment, we have pre-configured user credentials for Grafana Dashboard. This is not a best practice and we strongly recommend you to configure access via AWS IAM/SSO. (./deployment/Infrastructure/deployment/prometheus/prometheus-values.yaml, ./tools/benchmark-utils/function.sh) +* Since CloudTrail is enabled on the AWS account by default. we strongly recommend not to disable it. We have not made any CloudTrail configuration on the code kit to enable it if it is disabled. +* Use [update-node-group-size.sh](./update-node-group-size) to downsize the EKS cluster to zero to save compute costs while testing +* Use [check-pod-logs.sh](./check-pod-logs.sh) to get the bidder logs for troubleshooting purposes + +# How to use ALB with RTB Kit + +1. Install ALB controller via helm refer - https://docs.aws.amazon.com/eks/latest/userguide/lbc-helm.html +2. Attach Policy "AWSLoadBalancerControllerIAMPolicy" to the EKSWorkerRole "$cluster-name-EksWorkerRole" +3. add tags to subnet kubernetes.io/cluster/eks-alb +4. Make sure subnet route table is pointing to inter gateway +5. Create ingress resource which should provision ALB (ingress file is already placed in current directory) +6. EDIT deployment/infrastructure/Makefile with below +---> TARGET="http://\/bidrequest" +7. Remove below line from deployment/infrastructure/charts/load-generator/templates/job.yaml + ``` + < - --track-errors={{ .Values.trackErrors }} + < {{- if $.Values.waitForService.enable }} + < initContainers: + < - name: wait-for-service + < image: "{{ .Values.public_ecr_registry }}/{{ .Values.waitForService.image }}" + < env: + < - name: TARGETS + < value: {{ include "load-generator.waitForServiceTargets" $ }} + < args: + < - 'sh' + < - '-c' + < - | + < for TARGET in $TARGETS; do + < until wget --spider --no-check-certificate -T 5 $TARGET; do + < echo "Still waiting for $TARGET..." + < sleep 1; + < done; + < done; + < {{- end }} + < securityContext: + < {{- toYaml .Values.podSecurityContext | nindent 8 }} + ", - "RTBKIT_ROOT_STACK_NAME": "", - "RTBKIT_VARIANT": "" - }, - - "@aws-cdk/core:newStyleStackSynthesis": true, - "@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true, - "@aws-cdk/core:enableStackNameDuplicates": "true", - "aws-cdk:enableDiffNoFail": "true", - "@aws-cdk/core:stackRelativeExports": "true", - "@aws-cdk/aws-ecr-assets:dockerIgnoreSupport": true, - "@aws-cdk/aws-secretsmanager:parseOwnedSecretName": true, - "@aws-cdk/aws-kms:defaultKeyPolicies": true, - "@aws-cdk/aws-s3:grantWriteWithoutAcl": true, - "@aws-cdk/aws-ecs-patterns:removeDefaultDesiredCount": true, - "@aws-cdk/aws-rds:lowercaseDbIdentifier": true, - "@aws-cdk/aws-efs:defaultEncryptionAtRest": true, - "@aws-cdk/aws-lambda:recognizeVersionProps": true, - "@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": true + "@aws-cdk/aws-lambda:recognizeLayerVersion": true, + "@aws-cdk/core:checkSecretUsage": true, + "@aws-cdk/core:target-partitions": [ + "aws", + "aws-cn" + ], + "@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true, + "@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true, + "@aws-cdk/aws-ecs:arnFormatIncludesClusterName": true, + "@aws-cdk/aws-iam:minimizePolicies": true, + "@aws-cdk/core:validateSnapshotRemovalPolicy": true, + "@aws-cdk/aws-codepipeline:crossAccountKeyAliasStackSafeResourceName": true, + "@aws-cdk/aws-s3:createDefaultLoggingPolicy": true, + "@aws-cdk/aws-sns-subscriptions:restrictSqsDescryption": true, + "@aws-cdk/aws-apigateway:disableCloudWatchRole": true, + "@aws-cdk/core:enablePartitionLiterals": true, + "@aws-cdk/aws-events:eventsTargetQueueSameAccount": true, + "@aws-cdk/aws-iam:standardizedServicePrincipals": true, + "@aws-cdk/aws-ecs:disableExplicitDeploymentControllerForCircuitBreaker": true, + "@aws-cdk/aws-iam:importedRoleStackSafeDefaultPolicyName": true, + "@aws-cdk/aws-s3:serverAccessLogsUseBucketPolicy": true, + "@aws-cdk/aws-route53-patters:useCertificate": true, + "@aws-cdk/customresources:installLatestAwsSdkDefault": false } } diff --git a/cdk/pipeline/pipeline/pipeline_stack.py b/cdk/pipeline/pipeline/pipeline_stack.py index 47b687d..184ac08 100644 --- a/cdk/pipeline/pipeline/pipeline_stack.py +++ b/cdk/pipeline/pipeline/pipeline_stack.py @@ -1,106 +1,107 @@ -# Description: Guidance for Building a Real Time Bidder for Advertising on AWS (SO9111). Deploys AWS CodeCommit, CodeBuild and CodePipeline - +# Description: Guidance for Building a Real Time Bidder for Advertising on AWS (SO9111). Deploys AWS CodeBuild and CodePipeline that in turn deploys the CFN templates with infra and bidder application on EKS +import os from aws_cdk import ( - core as cdk, - aws_codecommit as cc, + Stack, aws_codebuild as cb, aws_codepipeline as cp, aws_codepipeline_actions as cpa, aws_iam as iam, - pipelines as pp + SecretValue ) +from constructs import Construct +class PipelineStack(Stack): - -# class PipelineStage(cdk.Stage): - -# def __init__(self, scope: cdk.Construct, id: str, **kwargs): -# super().__init__(scope, id, **kwargs) - -# service = PypipworkshopStack(self, 'WebService') - - - -class PipelineStack(cdk.Stack): - - def __init__(self, scope: cdk.Construct, construct_id: str, **kwargs) -> None: + def __init__(self, scope: Construct, construct_id: str, stage: str="dev" , **kwargs) -> None: super().__init__(scope, construct_id, **kwargs) - stage = self.node.try_get_context("stage") - - if not stage: - stage = "dev" - - stage_env_vars = self.node.try_get_context(stage) + acc = os.getenv("CDK_DEFAULT_ACCOUNT") + reg = os.getenv("CDK_DEFAULT_REGION") - repo = cc.Repository( - self, 'RTBCodeKit', - repository_name="RTBCodeKitRepo" + # Get environment-specific context + env_context = self.node.try_get_context(stage) + shared_context = self.node.try_get_context('shared') + + if not shared_context["REPO_OWNER"]: + repo_owner = "aws-solutions-library-samples" + else: + repo_owner = shared_context["REPO_OWNER"] + + if not shared_context["REPO_NAME"]: + repo_name = "guidance-for-building-a-real-time-bidder-for-advertising-on-aws" + else: + repo_name = shared_context["REPO_NAME"] + + if not shared_context["ROOT_STACK_NAME"]: + root_stack_name = "aws-rtbkit" + else: + # fix for issue #59 - Bucket name that prefixes stack name needs to be lowercase + # and cannot have underscores + root_stack_name = shared_context["ROOT_STACK_NAME"].lower().replace("_", "-") + + if not shared_context["STACK_VARIANT"]: + stack_variant = "DynamoDB" + else: + stack_variant = shared_context["STACK_VARIANT"] + + if not env_context["REPO_BRANCH"]: + repo_branch = "main" + else: + repo_branch = env_context["REPO_BRANCH"] + + if not env_context["GITHUB_TOKEN_SECRET_ID"]: + secret_id = "rtbkit-github-token" + else: + secret_id = env_context["GITHUB_TOKEN_SECRET_ID"] + + # fix for issue #79 code commit deprecation + # the solution now points to the opensource github repo by default + # customers can update their repo configurations through context variables + # To provide GitHub credentials, please either go to AWS CodeBuild Console to connect or call ImportSourceCredentials to persist your personal access token. Example: + # aws codebuild import-source-credentials --server-type GITHUB --auth-type PERSONAL_ACCESS_TOKEN --token + cb_source = cb.Source.git_hub( + owner=repo_owner, + repo=repo_name, + webhook=True, + webhook_triggers_batch_build=True, + webhook_filters=[ + cb.FilterGroup.in_event_of(cb.EventAction.PUSH).and_branch_is(repo_branch).and_commit_message_is("the commit message"), + # cb.FilterGroup.in_event_of(cb.EventAction.RELEASED).and_branch_is(repo_branch) + ] ) - - cb_source = cb.Source.code_commit(repository=repo) - # Defines the artifact representing the sourcecode source_artifact = cp.Artifact() # Defines the artifact representing the cloud assembly # (cloudformation template + all other assets) cloud_assembly_artifact = cp.Artifact() - # Generates the source artifact from the repo we created in the last step - source_action=cpa.CodeCommitSourceAction( - action_name='CodeCommit', # Any Git-based source control - output=source_artifact, # Indicates where the artifact is stored - repository=repo # Designates the repo to draw code from + source_action=cpa.GitHubSourceAction( + action_name='GitHubSourceAction', + owner=repo_owner, + repo=repo_name, + oauth_token=SecretValue.secrets_manager(secret_id), + output=source_artifact, + branch=repo_branch ) - rtb_pipeline_role = iam.Role(self, id="rtbkit_codebuild_role", + rtb_pipeline_role = iam.Role(self, id="rtbkit_codebuild_role", role_name="rtbkit_codebuild_role", assumed_by=iam.CompositePrincipal( iam.ServicePrincipal('codebuild.amazonaws.com'), iam.ServicePrincipal('codepipeline.amazonaws.com'), ), - description=None, - external_id=None, - external_ids=None, - inline_policies=None, - managed_policies=None, - max_session_duration=None, - path="/rtbkit/", - permissions_boundary=None, - role_name=None, + path="/rtbkit/" ) # Fix for issue #61 - # admin_policy = iam.ManagedPolicy.from_managed_policy_arn( - # scope=self, - # id="rtbkit_admin_policy", - # managed_policy_arn={"arn:aws:iam::aws:policy/AdministratorAccess", - # "arn:aws:iam::aws:policy/AmazonEKSClusterPolicy", - # "arn:aws:iam::aws:policy/AmazonS3FullAccess", - # "arn:aws:iam::aws:policy/AmazonKinesisFullAccess", - # "arn:aws:iam::aws:policy/AmazonDynamoDBFullAccess", - # "arn:aws:iam::aws:policy/AmazonVPCFullAccess", - # "arn:aws:iam::aws:policy/AWSCodeBuildAdminAccess", - # "arn:aws:iam::aws:policy/AWSCloudFormationFullAccess"} - # ) - - # rtb_pipeline_role.add_managed_policy(admin_policy) rtb_pipeline_role = self.add_managed_policies(rtb_pipeline_role) cb_project=cb.Project(self, "RTBPipelineProject", environment={ - # "compute-type": - # "build_image": cb.LinuxBuildImage.from_code_build_image_id("aws/codebuild/standard:5.0"), - "build_image": cb.LinuxBuildImage.from_code_build_image_id("aws/codebuild/amazonlinux2-aarch64-standard:2.0"), - # optional certificate to include in the build image - # "certificate": { - # "bucket": s3.Bucket.from_bucket_name(self, "Bucket", "my-bucket"), - # "object_key": "path/to/cert.pem" - # } + "build_image": cb.LinuxBuildImage.AMAZON_LINUX_2_ARM_3, "privileged": True, }, environment_variables={ - "AWS_ACCOUNT_ID": cb.BuildEnvironmentVariable(value=stage_env_vars['AWS_ACCOUNT_ID']), - # fix for issue #59 - Bucket name needs to be lowercase - "RTBKIT_ROOT_STACK_NAME": (cb.BuildEnvironmentVariable(value=stage_env_vars['RTBKIT_ROOT_STACK_NAME'].lower().replace("_", "-"))), - "RTBKIT_VARIANT": cb.BuildEnvironmentVariable(value=stage_env_vars['RTBKIT_VARIANT']), + "AWS_ACCOUNT_ID": cb.BuildEnvironmentVariable(value=acc), + "RTBKIT_ROOT_STACK_NAME": (cb.BuildEnvironmentVariable(value=root_stack_name)), + "RTBKIT_VARIANT": cb.BuildEnvironmentVariable(value=stack_variant), }, source=cb_source, role=rtb_pipeline_role, @@ -136,32 +137,6 @@ def __init__(self, scope: cdk.Construct, construct_id: str, **kwargs) -> None: cfn_build = cb_project.node.default_child cfn_build.add_override("Properties.Environment.Type", "ARM_CONTAINER") - - # cfn_codebuild = cb_project.node.default_child - # cfn_codebuild.add_deletion_override("Properties.ServiceRole") - - # cloud_assembly_artifact=cloud_assembly_artifact, - - # # Builds our source code outlined above into a could assembly artifact - # synth_action=pp.ShellScriptAction( - # action_name="Build", - # # build_spec="buildspec.yml" - # additional_artifacts=[ - # source_artifact, - # ], - # commands=[ - # "curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash", - # "echo \"installed helm\"", - # 'export DOCKER_CLI_EXPERIMENTAL=enabled', - # 'echo "Starting build `date` in `pwd`', - # # 'chmod +x ./initialize-repo.sh && ./initialize-repo.sh ${REGION} ${STACK_NAME} ${VARIANT} yes yes', - # 'chmod +x ./initialize-repo.sh && ./initialize-repo.sh 504382435436 us-east-1 rtb-bidder-stack-1006 DynamoDB yes yes', - # 'echo "Build completed `date`"', - # ], - # ) - - # deploy = RTBPipelineStage(self, 'Deploy') - # pp.add_application_stage(deploy) # fix for issue #61 def add_managed_policies(self, iamrole: iam.Role) -> iam.Role: diff --git a/cdk/pipeline/setup.py b/cdk/pipeline/setup.py index 9feb05a..36e1685 100644 --- a/cdk/pipeline/setup.py +++ b/cdk/pipeline/setup.py @@ -7,37 +7,31 @@ setuptools.setup( name="pipeline", - version="0.0.1", + version="0.0.2", - description="An empty CDK Python app", + description="RTB Code kit CDK code build pipeline", long_description=long_description, long_description_content_type="text/markdown", - author="author", + author="AWS AMT TFC", package_dir={"": "pipeline"}, packages=setuptools.find_packages(where="pipeline"), install_requires=[ - "aws-cdk.core==1.123.0", + "aws-cdk-lib==2.149.0", + "cdk-nag==2.28.195" ], - python_requires=">=3.6", + python_requires=">=3.9", classifiers=[ "Development Status :: 4 - Beta", - "Intended Audience :: Developers", - "Programming Language :: JavaScript", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - "Programming Language :: Python :: 3.8", - "Topic :: Software Development :: Code Generators", "Topic :: Utilities", - "Typing :: Typed", ], ) diff --git a/check-pod-logs.sh b/check-pod-logs.sh new file mode 100755 index 0000000..a86ef25 --- /dev/null +++ b/check-pod-logs.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# This script is a helper to cleanup unhealthy pods + +set -e +# take input parameters for the benchmark +if [ -z "$1" ] +then + echo "Enter the pod prefix" + echo "Usage: ${0} [head|tail]" + echo "Example: ${0} load-generator" + exit 1 +fi +if [ -z "$2" ] +then + echo "Log option not given" +fi + +kubectl get pods + +pods=`kubectl get pods | grep "${1}" |sed -r 's/[ ]+/|/g'| cut -f 1,3 -d "|"` + +if [ -z "$pods" ] +then + echo "Pod Not found!" + exit 0 +fi + +while IFS= read -r line; do + pod=`echo $line | cut -f 1 -d "|"` + echo "$pod" + if [ "$2" = "head" ] + then + echo "Getting head" + + kubectl logs $pod | head + elif [ "$2" = "tail" ] + then + echo "Getting tail" + kubectl logs $pod | tail + + else + echo "Getting all logs" + kubectl logs $pod + fi +done <<< "$pods" diff --git a/cleanup-pods.sh b/cleanup-pods.sh new file mode 100755 index 0000000..243c4ad --- /dev/null +++ b/cleanup-pods.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# This script is a helper to check logs from the pods + +set -e +# take input parameters for the benchmark +kubectl get pods + +pods=`kubectl get pods | grep -v "NAME" | sed -r 's/[ ]+/|/g'| cut -f 1,3 -d "|"` + +if [ -z "$pods" ] +then + echo "Pod Not found!" + exit 0 +fi + +while IFS= read -r line; do + echo "$line" + pod=`echo $line | cut -f 1 -d "|"` + status=`echo $line | cut -f 2 -d "|"` + echo "$pod" + echo "$status" + if [ "$status" != "Running" ] + then + echo "deleting pod ${pod}" + kubectl delete pod $pod + fi +done <<< "$pods" + +kubectl get pods diff --git a/client-setup.sh b/client-setup.sh new file mode 100755 index 0000000..af37a09 --- /dev/null +++ b/client-setup.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash +set -ex + +# download specific version of helm +curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 +chmod 700 get_helm.sh && ./get_helm.sh --version v3.16.1 + +# download kubectl +#curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256" +curl -LO "https://dl.k8s.io/release/v1.30.0/bin/linux/amd64/kubectl" + +# install jq and helm +# check for os +if [ "$(uname)" == "Linux" ]; then + sudo yum install -y jq + sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl +elif [ "$(uname)" == "Darwin" ]; then + brew install jq + brew install kubectl +fi +# install kubectl specific version + +kubectl version --client --output=yaml + diff --git a/deployment/infrastructure/Makefile b/deployment/infrastructure/Makefile index b9021e4..80deaa2 100644 --- a/deployment/infrastructure/Makefile +++ b/deployment/infrastructure/Makefile @@ -126,6 +126,7 @@ eks@provision-codekit-aerospike: eks@provision-nvme eks@provision-codekit-dynamodb: eks@update-dashboards ## Provision basic services to EKS cluster eks@provision-codekit-dynamodb: eks@provision-prometheus eks@provision-codekit-dynamodb: eks@provision-prometheus-adapter +eks@provision-codekit-dynamodb: eks@provision-ebs-csi eks@update-dashboards: ## Update Grafana dashboards on EKS kubectl apply -k deployment/infrastructure/deployment/prometheus/dashboards @@ -136,7 +137,7 @@ eks@provision-external-dns: ## Provision External DNS eks@provision-prometheus: ## Provision Prometheus stack, adding a timeout parameter for resiliency helm repo add --force-update prometheus-community https://prometheus-community.github.io/helm-charts helm upgrade --install \ - --version 15.1.3 \ + --version 59.0 \ prom prometheus-community/kube-prometheus-stack \ -f deployment/infrastructure/deployment/prometheus/prometheus-values.yaml \ --timeout 10m30s --debug @@ -144,14 +145,14 @@ eks@provision-prometheus: ## Provision Prometheus stack, adding a timeout parame eks@provision-prometheus-adapter: ## Provision Prometheus adapter for custom metrics API helm repo add --force-update prometheus-community https://prometheus-community.github.io/helm-charts helm upgrade --install \ - --version 2.12.1 \ + --version 4.2.0 \ prom-adapter prometheus-community/prometheus-adapter \ -f deployment/infrastructure/deployment/prometheus/adapter-values.yaml eks@provision-autoscaler: ## Provision Cluster Autoscaler helm repo add --force-update autoscaler https://kubernetes.github.io/autoscaler helm upgrade --install \ - --version 9.9.2 \ + --version 9.37.0 \ autoscaler autoscaler/cluster-autoscaler \ -f deployment/infrastructure/deployment/autoscaler/values.yaml \ --set "autoDiscovery.clusterName=$(STACK_NAME)" @@ -159,7 +160,7 @@ eks@provision-autoscaler: ## Provision Cluster Autoscaler eks@provision-ebs-csi: ## Provision EBS CSI driver helm repo add --force-update aws-ebs-csi-driver https://kubernetes-sigs.github.io/aws-ebs-csi-driver helm upgrade --install \ - --version 0.10.2 \ + --version 2.30.0 \ aws-ebs-csi-driver aws-ebs-csi-driver/aws-ebs-csi-driver \ -f deployment/infrastructure/deployment/ebs-csi-driver/values.yaml kubectl apply -f deployment/infrastructure/deployment/ebs-csi-driver/crd diff --git a/deployment/infrastructure/application.yaml b/deployment/infrastructure/application.yaml index 0cc4bbc..94ead47 100644 --- a/deployment/infrastructure/application.yaml +++ b/deployment/infrastructure/application.yaml @@ -1,5 +1,5 @@ AWSTemplateFormatVersion: "2010-09-09" -Description: Guidance for Building a Real Time Bidder for Advertising on AWS (SO9111). This template has configuration mappings for different variations of benchmarks and will trigger nested templated to deploy VPC, VPC Endpoints, EKS Cluster, Kinesis DataStreams and Firehose, and Cloud9 Instance. +Description: Guidance for Building a Real Time Bidder for Advertising on AWS (SO9111). This template has configuration mappings for different variations of benchmarks and will trigger nested templated to deploy VPC, VPC Endpoints, EKS Cluster, Kinesis DataStreams and Firehose. Parameters: RootStackName: @@ -675,7 +675,7 @@ Resources: TemplateURL: ./templates/vpc.yaml Parameters: EksClusterName: !Ref AWS::StackName - RootStackName: !Ref RootStackName # adding root stack name to fix cloud9 client error + RootStackName: !Ref RootStackName Tags: - Key: stackName Value: !Ref AWS::StackName @@ -751,28 +751,18 @@ Resources: - Key: stackName Value: !Ref AWS::StackName - CnineInstance: - Type: AWS::CloudFormation::Stack - DependsOn: VPC - Properties: - TemplateURL: ./templates/cloud9.yaml - Parameters: - RootStackName: !Ref RootStackName - Subnet04: !GetAtt [VPC, Outputs.SubnetId] + # CnineInstance: + # Type: AWS::CloudFormation::Stack + # DependsOn: VPC + # Properties: + # TemplateURL: ./templates/cloud9.yaml + # Parameters: + # RootStackName: !Ref RootStackName + # Subnet04: !GetAtt [VPC, Outputs.SubnetId] Outputs: StackName: Description: The Name of the Application Stack Value: !Ref AWS::StackName Export: - Name: StackName - - Cloud9IDEURL: - Description: IDE URL to access cloud9 - Value: !GetAtt CnineInstance.Outputs.Cloud9IDEURL - - Cloud9EnvID: - Description: cloud9 instance enevironment ID - Value: !GetAtt CnineInstance.Outputs.Cloud9EnvID - - + Name: StackName \ No newline at end of file diff --git a/deployment/infrastructure/codekit.yaml b/deployment/infrastructure/codekit.yaml index 3096834..e7183e2 100644 --- a/deployment/infrastructure/codekit.yaml +++ b/deployment/infrastructure/codekit.yaml @@ -200,7 +200,9 @@ Resources: - eks:ListTagsForResource - eks:AccessKubernetesApi Effect: Allow - Resource: !Sub "arn:aws:eks:${AWS::Region}:${AWS::AccountId}:cluster/${AWS::StackName}*" + Resource: + - !Sub "arn:aws:eks:${AWS::Region}:${AWS::AccountId}:cluster/${AWS::StackName}*" + - !Sub "arn:aws:eks:${AWS::Region}:${AWS::AccountId}:nodegroup/${AWS::StackName}*" Version: '2012-10-17' PolicyName: "EksClusterAccessPolicy" Roles: @@ -367,7 +369,42 @@ Resources: Roles: - Ref: EksAccessRole - Ref: EksWorkerRole - + + EKSWorkerRoleAutoScalerPolicy: + Type: AWS::IAM::Policy + DependsOn: EksAccessRole + Description: The autoscaler will scale down the nodes in the nodegroups based on the setting. + Properties: + Roles: + - Ref: EksAccessRole + - Ref: EksWorkerRole + PolicyName: "AutoScalerEKSPolicy" + PolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Action: + - autoscaling:DescribeAutoScalingGroups + - autoscaling:DescribeAutoScalingInstances + - autoscaling:DescribeLaunchConfigurations + - autoscaling:DescribeScalingActivities + - ec2:DescribeImages + - ec2:DescribeInstanceTypes + - ec2:DescribeLaunchTemplateVersions + - ec2:GetInstanceTypesFromInstanceRequirements + - eks:DescribeNodegroup + Resource: "*" + - Effect: Allow + Action: + - autoscaling:SetDesiredCapacity + - autoscaling:TerminateInstanceInAutoScalingGroup + Resource: "*" + Metadata: + cfn_nag: + rules_to_suppress: + - id: W12 + reason: Can't point to a specific resource in order to support autodiscovery. Customers can update this policy complementary to the change in the make file by identifying autoscaling groups in the helm deploy commands + DatagenAppRepository: Type: AWS::ECR::Repository Properties: @@ -426,12 +463,4 @@ Outputs: EksNvmeProvisionerRepository: Value: !Sub "${AWS::StackName}-nvme-provisioner" Export: - Name: EksNvmeProvisionerRepository - - Cloud9IDEURL: - Description: IDE URL to access cloud9 - Value: !GetAtt ApplicationStack.Outputs.Cloud9IDEURL - - Cloud9EnvID: - Description: cloud9 instance enevironment ID - Value: !GetAtt ApplicationStack.Outputs.Cloud9EnvID + Name: EksNvmeProvisionerRepository \ No newline at end of file diff --git a/deployment/infrastructure/deployment/autoscaler/values.yaml b/deployment/infrastructure/deployment/autoscaler/values.yaml index 85b587f..5ee4bb6 100644 --- a/deployment/infrastructure/deployment/autoscaler/values.yaml +++ b/deployment/infrastructure/deployment/autoscaler/values.yaml @@ -61,7 +61,7 @@ magnumClusterName: "" magnumCABundlePath: "/etc/kubernetes/ca-bundle.crt" # cloudConfigPath -- Configuration file for cloud provider. -cloudConfigPath: /etc/gce.conf +# cloudConfigPath: /etc/gce.conf # cloudProvider -- The cloud provider where the autoscaler runs. # Currently only `gce`, `aws`, `azure` and `magnum` are supported. @@ -153,9 +153,9 @@ fullnameOverride: "" image: # image.repository -- Image repository - repository: us.gcr.io/k8s-artifacts-prod/autoscaling/cluster-autoscaler + repository: registry.k8s.io/autoscaling/cluster-autoscaler # image.tag -- Image tag - tag: v1.20.0 + tag: v1.30.2 # image.pullPolicy -- Image pull policy pullPolicy: IfNotPresent ## Optionally specify an array of imagePullSecrets. diff --git a/deployment/infrastructure/deployment/ebs-csi-driver/values.yaml b/deployment/infrastructure/deployment/ebs-csi-driver/values.yaml index 8135ed1..f58456f 100644 --- a/deployment/infrastructure/deployment/ebs-csi-driver/values.yaml +++ b/deployment/infrastructure/deployment/ebs-csi-driver/values.yaml @@ -5,29 +5,29 @@ replicaCount: 1 image: - repository: k8s.gcr.io/provider-aws/aws-ebs-csi-driver - tag: "v0.9.0" + repository: public.ecr.aws/ebs-csi-driver/aws-ebs-csi-driver + tag: "v1.30.0" pullPolicy: IfNotPresent sidecars: provisionerImage: - repository: k8s.gcr.io/sig-storage/csi-provisioner - tag: "v2.0.2" + repository: public.ecr.aws/eks-distro/kubernetes-csi/external-provisioner + tag: "v4.0.1-eks-1-30-4" attacherImage: - repository: k8s.gcr.io/sig-storage/csi-attacher - tag: "v3.0.0" + repository: public.ecr.aws/eks-distro/kubernetes-csi/external-attacher + tag: "v4.5.1-eks-1-30-4" snapshotterImage: - repository: k8s.gcr.io/sig-storage/csi-snapshotter - tag: "v3.0.3" + repository: public.ecr.aws/eks-distro/kubernetes-csi/external-snapshotter/csi-snapshotter + tag: "v7.0.2-eks-1-30-4" livenessProbeImage: - repository: k8s.gcr.io/sig-storage/livenessprobe - tag: "v2.2.0" + repository: public.ecr.aws/eks-distro/kubernetes-csi/livenessprobe + tag: "v2.12.0-eks-1-30-4" resizerImage: - repository: k8s.gcr.io/sig-storage/csi-resizer - tag: "v1.0.0" + repository: public.ecr.aws/eks-distro/kubernetes-csi/external-resizer + tag: "v1.10.1-eks-1-30-4" nodeDriverRegistrarImage: - repository: k8s.gcr.io/sig-storage/csi-node-driver-registrar - tag: "v2.0.1" + repository: public.ecr.aws/eks-distro/kubernetes-csi/node-driver-registrar + tag: "v2.10.1-eks-1-30-4" snapshotController: repository: k8s.gcr.io/sig-storage/snapshot-controller diff --git a/deployment/infrastructure/deployment/prometheus/dashboards/autoscaler.json b/deployment/infrastructure/deployment/prometheus/dashboards/autoscaler.json index 321858d..6deb8ea 100644 --- a/deployment/infrastructure/deployment/prometheus/dashboards/autoscaler.json +++ b/deployment/infrastructure/deployment/prometheus/dashboards/autoscaler.json @@ -3,7 +3,10 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -14,79 +17,80 @@ }, "description": "Super simple dashboard showing an overview of kubernetes cluster autoscaling activity and status, using metrics reported by the autoscaler to prometheus.\r\n\r\nhttps://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler", "editable": true, + "fiscalYearStartMonth": 0, "gnetId": 3831, "graphTooltip": 0, - "id": 29, "links": [], "panels": [ { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" }, "overrides": [] }, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, "gridPos": { "h": 4, "w": 4, "x": 0, "y": 0 }, - "height": "150", "id": 4, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true }, - "tableColumn": "", + "pluginVersion": "10.4.1", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum(cluster_autoscaler_nodes_count)\n", "format": "time_series", "intervalFactor": 2, @@ -94,89 +98,84 @@ "step": 600 } ], - "thresholds": "", "title": "Total nodes", - "type": "singlestat", - "valueFontSize": "100%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" + "type": "stat" }, { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": true, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "Prometheus", - "decimals": null, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "description": "Shows the nodes which are ready as a percent of the total nodes", "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 100 + }, + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 95 + } + ] + }, + "unit": "percent" }, "overrides": [] }, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": false - }, "gridPos": { "h": 4, "w": 4, "x": 4, "y": 0 }, - "height": "150", "id": 6, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false + "options": { + "minVizHeight": 75, + "minVizWidth": 75, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": false, + "sizing": "auto" }, - "tableColumn": "", + "pluginVersion": "10.4.1", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum(cluster_autoscaler_nodes_count{state=\"ready\"})/sum(cluster_autoscaler_nodes_count)*100", "format": "time_series", "intervalFactor": 2, @@ -184,87 +183,84 @@ "step": 600 } ], - "thresholds": "100,95,80", "title": "Nodes available", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" + "type": "gauge" }, { - "cacheTimeout": null, - "colorBackground": true, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "text": "No" + }, + "1": { + "text": "Yes" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0 + }, + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 1 + } + ] + }, + "unit": "none" }, "overrides": [] }, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, "gridPos": { "h": 4, "w": 4, "x": 8, "y": 0 }, - "height": "150", "id": 9, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true }, - "tableColumn": "", + "pluginVersion": "10.4.1", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum(cluster_autoscaler_cluster_safe_to_autoscale)", "format": "time_series", "intervalFactor": 2, @@ -273,93 +269,72 @@ "step": 600 } ], - "thresholds": "0,1", "title": "Is cluster safe to scale?", - "type": "singlestat", - "valueFontSize": "100%", - "valueMaps": [ - { - "op": "=", - "text": "Yes", - "value": "1" - }, - { - "op": "=", - "text": "No", - "value": "0" - } - ], - "valueName": "current" + "type": "stat" }, { - "cacheTimeout": null, - "colorBackground": true, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "description": "Tells you if there are unscheduled pods", "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(50, 172, 45, 0.97)", + "value": null + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 1 + }, + { + "color": "rgba(245, 54, 54, 0.9)" + } + ] + }, + "unit": "none" }, "overrides": [] }, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, "gridPos": { "h": 4, "w": 4, "x": 12, "y": 0 }, - "height": "150", "id": 12, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "1", - "text": "Yes", - "to": "" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true }, - "tableColumn": "", + "pluginVersion": "10.4.1", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum(cluster_autoscaler_unschedulable_pods_count)", "format": "time_series", "intervalFactor": 1, @@ -368,81 +343,78 @@ "step": 300 } ], - "thresholds": "1", "title": "Number of unscheduled pods", - "type": "singlestat", - "valueFontSize": "100%", - "valueMaps": [], - "valueName": "current" + "type": "stat" }, { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" }, "overrides": [] }, - "format": "s", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, "gridPos": { "h": 4, "w": 4, "x": 16, "y": 0 }, - "height": "150", "id": 7, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true }, - "tableColumn": "", + "pluginVersion": "10.4.1", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum(time()-cluster_autoscaler_last_activity{activity=\"scaleDown\"})", "format": "time_series", "intervalFactor": 2, @@ -451,87 +423,78 @@ "step": 600 } ], - "thresholds": "", "title": "Last scaleDown activity", - "type": "singlestat", - "valueFontSize": "100%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" + "type": "stat" }, { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" }, "overrides": [] }, - "format": "s", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, "gridPos": { "h": 4, "w": 4, "x": 20, "y": 0 }, - "height": "150", "id": 8, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true }, - "tableColumn": "", + "pluginVersion": "10.4.1", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum(time()-cluster_autoscaler_last_activity{activity=\"autoscaling\"})", "format": "time_series", "intervalFactor": 2, @@ -540,74 +503,97 @@ "step": 600 } ], - "thresholds": "", "title": "Last autoscale activity", - "type": "singlestat", - "valueFontSize": "100%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" + "type": "stat" }, { - "alerting": {}, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "description": "Shows the evicted and unscheduled pods", - "editable": true, - "error": false, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Num Nodes", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, - "grid": {}, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 4 }, - "height": "250px", - "hiddenSeries": false, "id": 11, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum(cluster_autoscaler_evicted_pods_total)", "format": "time_series", "hide": false, @@ -618,6 +604,10 @@ "step": 300 }, { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum(cluster_autoscaler_unschedulable_pods_count)", "format": "time_series", "intervalFactor": 2, @@ -626,103 +616,97 @@ "step": 60 } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Pod activity", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "none", - "label": "Num Nodes", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "alerting": {}, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "description": "Shows the state of the nodes as scaling happens", - "editable": true, - "error": false, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Num Nodes", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, - "grid": {}, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 4 }, - "height": "250px", - "hiddenSeries": false, "id": 10, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum(cluster_autoscaler_nodes_count{state=\"ready\"})", "format": "time_series", "hide": false, @@ -733,6 +717,10 @@ "step": 300 }, { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum(cluster_autoscaler_nodes_count{state=\"unready\"})", "format": "time_series", "intervalFactor": 2, @@ -741,6 +729,10 @@ "step": 60 }, { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum(cluster_autoscaler_nodes_count{state=\"notStarted\"})\n", "format": "time_series", "intervalFactor": 2, @@ -749,102 +741,96 @@ "step": 60 } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Node activity", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "none", - "label": "Num Nodes", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "alerting": {}, - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Prometheus", - "editable": true, - "error": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Num nodes", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, - "grid": {}, "gridPos": { "h": 7, "w": 16, "x": 0, "y": 11 }, - "height": "250px", - "hiddenSeries": false, "id": 3, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum(cluster_autoscaler_scaled_up_nodes_total)", "format": "time_series", "hide": false, @@ -855,6 +841,10 @@ "step": 200 }, { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum(cluster_autoscaler_unneeded_nodes_count)", "format": "time_series", "intervalFactor": 2, @@ -863,6 +853,10 @@ "step": 40 }, { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum(cluster_autoscaler_nodes_count)\n", "format": "time_series", "intervalFactor": 2, @@ -871,127 +865,100 @@ "step": 40 } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Autoscaling activity", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "none", - "label": "Num nodes", - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "datasource": "Prometheus", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "description": "Is the cluster scaling up, down or ticking along okay?", "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "from": -1000, + "result": { + "text": "Down" + }, + "to": -1 + }, + "type": "range" + }, + { + "options": { + "from": 1, + "result": { + "text": "Up" + }, + "to": 1000 + }, + "type": "range" + }, + { + "options": { + "from": 0, + "result": { + "text": "Nowhere" + }, + "to": 0 + }, + "type": "range" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" }, "overrides": [] }, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, "gridPos": { "h": 4, "w": 8, "x": 16, "y": 11 }, - "height": "150", "id": 13, - "interval": null, - "links": [], - "mappingType": 2, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "-1000", - "text": "Down", - "to": "-1" - }, - { - "from": "1", - "text": "Up", - "to": "1000" + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false }, - { - "from": "0", - "text": "Nowhere", - "to": "0" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true }, - "tableColumn": "", + "pluginVersion": "10.4.1", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum(cluster_autoscaler_scaled_up_nodes_total)-sum(cluster_autoscaler_scaled_down_nodes_total)", "format": "time_series", "intervalFactor": 2, @@ -1000,23 +967,12 @@ "step": 600 } ], - "thresholds": "", "title": "Cluster direction?", - "type": "singlestat", - "valueFontSize": "100%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" + "type": "stat" } ], "refresh": "10s", - "schemaVersion": 26, - "style": "dark", + "schemaVersion": 39, "tags": [ "prometheus" ], @@ -1055,5 +1011,6 @@ "timezone": "browser", "title": "Kubernetes Cluster Autoscaler", "uid": "R7CsCrPMk", - "version": 3 -} + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/deployment/infrastructure/deployment/prometheus/dashboards/bidder.json b/deployment/infrastructure/deployment/prometheus/dashboards/bidder.json index 4750e1c..0634cee 100644 --- a/deployment/infrastructure/deployment/prometheus/dashboards/bidder.json +++ b/deployment/infrastructure/deployment/prometheus/dashboards/bidder.json @@ -3,7 +3,10 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -13,13 +16,16 @@ ] }, "editable": true, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, "links": [], "panels": [ { - "collapsed": false, - "datasource": null, + "collapsed": true, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "gridPos": { "h": 1, "w": 24, @@ -27,2326 +33,2572 @@ "y": 0 }, "id": 5, - "panels": [], - "title": "Requests", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "decimals": 2, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 1 - }, - "hiddenSeries": false, - "id": 2, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideZero": true, - "max": true, - "min": false, - "rightSide": false, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": false - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(irate(bidder_bid_request_received_number[1m]))", - "interval": "", - "legendFormat": "Received bid requests", - "refId": "B" - }, - { - "expr": "sum(irate(bidder_no_bid_number[1m]))", - "hide": false, - "interval": "", - "legendFormat": "No bids", - "refId": "D" - }, - { - "expr": "sum(irate(bidder_request_timeout_number[1m]))", - "interval": "", - "legendFormat": "Timeouts", - "refId": "F" - }, - { - "expr": "sum(irate(bidder_server_error_number[1m]))", - "hide": false, - "interval": "", - "legendFormat": "Server errors", - "refId": "E" - }, - { - "expr": "sum(irate(bidder_bad_request_number[1m]))", - "hide": false, - "interval": "", - "legendFormat": "Bad requests", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Throughput per second", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:72", - "decimals": 2, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:73", - "decimals": null, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "decimals": 0, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 1 - }, - "hiddenSeries": false, - "id": 3, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideZero": true, - "max": true, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": false - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "max by (quantile) (bidder_bid_request_time)", - "interval": "", - "legendFormat": "Summary {{quantile}}", - "refId": "D" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Latency", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:192", - "decimals": 2, - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, + "panels": [ { - "$$hashKey": "object:193", - "decimals": null, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "datasource": null, - "fieldConfig": { - "defaults": { - "custom": { - "align": null, - "filterable": false + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ { - "color": "red", - "value": 80 + "matcher": { + "id": "byValue", + "options": { + "op": "gte", + "reducer": "allIsZero", + "value": 0 + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": true, + "tooltip": true, + "viz": false + } + } + ] } ] }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 10 - }, - "id": 10, - "interval": "", - "options": { - "showHeader": true - }, - "pluginVersion": "7.5.3", - "targets": [ - { - "expr": "sum(bidder_bid_request_received_number)", - "hide": false, - "interval": "", - "legendFormat": "Bid requests", - "refId": "A" - }, - { - "expr": "sum(bidder_no_bid_number)", - "hide": false, - "interval": "", - "legendFormat": "No bids", - "refId": "D" - }, - { - "expr": "sum(bidder_request_timeout_number)", - "hide": false, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 1 + }, + "id": 2, "interval": "", - "legendFormat": "Timeouts", - "refId": "B" + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "sum" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(irate(bidder_bid_request_received_number[1m]))", + "interval": "", + "legendFormat": "Received bid requests", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(irate(bidder_no_bid_number[1m]))", + "hide": false, + "interval": "", + "legendFormat": "No bids", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(irate(bidder_request_timeout_number[1m]))", + "interval": "", + "legendFormat": "Timeouts", + "refId": "F" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(irate(bidder_server_error_number[1m]))", + "hide": false, + "interval": "", + "legendFormat": "Server errors", + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(irate(bidder_bad_request_number[1m]))", + "hide": false, + "interval": "", + "legendFormat": "Bad requests", + "refId": "C" + } + ], + "title": "Throughput per second", + "type": "timeseries" }, { - "expr": "sum(bidder_server_error_number)", - "hide": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [ + { + "matcher": { + "id": "byValue", + "options": { + "op": "gte", + "reducer": "allIsZero", + "value": 0 + } + }, + "properties": [ + { + "id": "custom.hideFrom", + "value": { + "legend": true, + "tooltip": true, + "viz": false + } + } + ] + } + ] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 1 + }, + "id": 3, "interval": "", - "legendFormat": "Server errors", - "refId": "E" + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "max by (quantile) (bidder_bid_request_time)", + "interval": "", + "legendFormat": "Summary {{quantile}}", + "refId": "D" + } + ], + "title": "Latency", + "type": "timeseries" }, { - "expr": "sum(bidder_bad_request_number)", - "hide": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "custom": { + "cellOptions": { + "type": "auto" + }, + "filterable": false, + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 10 + }, + "id": 10, "interval": "", - "legendFormat": "Bad requests", - "refId": "C" + "options": { + "cellHeight": "sm", + "footer": { + "countRows": false, + "fields": "", + "reducer": [ + "sum" + ], + "show": false + }, + "showHeader": true + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(bidder_bid_request_received_number)", + "hide": false, + "interval": "", + "legendFormat": "Bid requests", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(bidder_no_bid_number)", + "hide": false, + "interval": "", + "legendFormat": "No bids", + "refId": "D" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(bidder_request_timeout_number)", + "hide": false, + "interval": "", + "legendFormat": "Timeouts", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(bidder_server_error_number)", + "hide": false, + "interval": "", + "legendFormat": "Server errors", + "refId": "E" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(bidder_bad_request_number)", + "hide": false, + "interval": "", + "legendFormat": "Bad requests", + "refId": "C" + } + ], + "title": "Time range summary", + "transformations": [ + { + "id": "reduce", + "options": { + "reducers": [ + "delta" + ] + } + } + ], + "type": "table" } ], - "timeFrom": null, - "timeShift": null, - "title": "Time range summary", - "transformations": [ + "targets": [ { - "id": "reduce", - "options": { - "reducers": [ - "delta" - ] - } + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "refId": "A" } ], - "type": "table" + "title": "Requests", + "type": "row" }, { - "collapsed": false, - "datasource": null, + "collapsed": true, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "gridPos": { "h": 1, "w": 24, "x": 0, - "y": 17 + "y": 1 }, "id": 7, - "panels": [], - "title": "Application", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "decimals": 2, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 18 - }, - "hiddenSeries": false, - "id": 8, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideZero": false, - "max": true, - "min": false, - "rightSide": false, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": false - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ + "panels": [ { - "expr": "sum(irate(bidder_device_query_time_count[1m]))", - "format": "time_series", - "hide": false, - "instant": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 2 + }, + "id": 8, "interval": "", - "intervalFactor": 1, - "legendFormat": "Device queries", - "refId": "A" + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "sum" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(irate(bidder_device_query_time_count[1m]))", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Device queries", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(irate(bidder_kinesis_time_count[1m]))", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Kinesis records (put)", + "refId": "C" + } + ], + "title": "Component throughput per second", + "type": "timeseries" }, { - "expr": "sum(irate(bidder_kinesis_time_count[1m]))", - "format": "time_series", - "hide": false, - "instant": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 2 + }, + "id": 9, "interval": "", - "intervalFactor": 1, - "legendFormat": "Kinesis records (put)", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Component throughput per second", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "max by (quantile) (bidder_device_query_time)", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Device query ({{quantile}})", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "max by (quantile) (bidder_kinesis_time)", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Kinesis requests ({{quantile}})", + "refId": "C" + } + ], + "title": "Component latency", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 11 + }, + "id": 31, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(bidder_bid_request_active_number)", + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "title": "Active bid requests", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 11 + }, + "id": 32, + "interval": "", + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "count(bidder_bid_request_time_count)", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Application replicas", + "type": "timeseries" + }, { - "$$hashKey": "object:371", - "decimals": 2, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 19 + }, + "id": 40, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "sum" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(irate(bidder_cache_refresh_request_recurring[1m]))", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Cache refresh requests count [recurring]", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(irate(bidder_cache_refresh_request_on_demand[1m]))", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Cache refresh requests count [on demand]", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(irate(budget_update_time_count[1m]))", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Cache refreshes count", + "refId": "C" + } + ], + "title": "Cache refresh requests count", + "type": "timeseries" }, { - "$$hashKey": "object:372", - "decimals": null, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 19 + }, + "id": 33, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "max by (quantile) (bidder_budget_update_time)", + "interval": "", + "legendFormat": "Budget update ({{quantile}})", + "refId": "A" + } + ], + "title": "Budget update latency", + "type": "timeseries" } ], - "yaxis": { - "align": false, - "alignLevel": null - } + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "refId": "A" + } + ], + "title": "Application", + "type": "row" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "decimals": 0, - "fieldConfig": { - "defaults": {}, - "overrides": [] + "collapsed": true, + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 18 - }, - "hiddenSeries": false, - "id": 9, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideZero": false, - "max": true, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": false + "h": 1, + "w": 24, + "x": 0, + "y": 2 }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ + "id": 12, + "panels": [ { - "expr": "max by (quantile) (bidder_device_query_time)", - "format": "time_series", - "hide": false, - "instant": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 3 + }, + "id": 13, "interval": "", - "intervalFactor": 1, - "legendFormat": "Device query ({{quantile}})", - "refId": "A" + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "sum" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum by (table_name, query_type) (irate(bidder_database_time_count[1m]))", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{table_name}}, {{query_type}}", + "refId": "A" + } + ], + "title": "Queries per table per second", + "type": "timeseries" }, { - "expr": "max by (quantile) (bidder_kinesis_time)", - "format": "time_series", - "hide": false, - "instant": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 3 + }, + "id": 36, "interval": "", - "intervalFactor": 1, - "legendFormat": "Kinesis requests ({{quantile}})", - "refId": "C" + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "max by (table_name, query_type) (irate(bidder_database_time[1m]))", + "format": "time_series", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "{{table_name}}, {{query_type}}", + "refId": "A" + } + ], + "title": "Queries per table latency", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 12 + }, + "id": 35, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "sum" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(irate(db_device_get_errors_number[1m]))", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "DB get device errors count", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(irate(db_audience_scan_errors_number[1m]))", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "DB get device errors count", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(irate(db_budget_scan_errors_number[1m]))", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "DB get device errors count", + "refId": "C" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(irate(db_campaign_scan_errors_number[1m]))", + "hide": false, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "DB get device errors count", + "refId": "D" + } + ], + "title": "Database errors count", + "type": "timeseries" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Component latency", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "refId": "A" + } + ], + "title": "Database", + "type": "row" + }, + { + "collapsed": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 3 }, - "yaxes": [ - { - "$$hashKey": "object:432", - "decimals": 2, - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, + "id": 16, + "panels": [], + "targets": [ { - "$$hashKey": "object:433", - "decimals": null, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "refId": "A" } ], - "yaxis": { - "align": false, - "alignLevel": null - } + "title": "Kinesis producer", + "type": "row" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "fieldConfig": { - "defaults": {}, - "overrides": [] + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Total size" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 27 + "y": 4 }, - "hiddenSeries": false, - "id": 31, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", + "id": 18, "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { - "expr": "sum(bidder_bid_request_active_number)", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(irate(bidder_go_kinesis_producer_user_records_put_total[1m]))", "interval": "", - "legendFormat": "", + "legendFormat": "Count", "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Active bid requests", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true }, { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(irate(bidder_go_kinesis_producer_user_records_data_put_bytes_sum[1m]))", + "interval": "", + "legendFormat": "Total size", + "refId": "B" } ], - "yaxis": { - "align": false, - "alignLevel": null - } + "title": "Logical records", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "decimals": 0, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "fieldConfig": { - "defaults": {}, + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 27 + "y": 4 }, - "hiddenSeries": false, - "id": 32, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideZero": false, - "max": true, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", + "id": 20, "options": { - "alertThreshold": false + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { - "expr": "count(bidder_bid_request_time_count)", - "format": "time_series", - "hide": false, - "instant": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "histogram_quantile(0.5, sum by (le) (rate(bidder_go_kinesis_producer_user_records_data_put_bytes_bucket[1m])))", "interval": "", - "intervalFactor": 1, - "legendFormat": "", + "legendFormat": "Histogram 0.5", "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Application replicas", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ + }, { - "$$hashKey": "object:432", - "decimals": null, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "histogram_quantile(0.95, sum by (le) (rate(bidder_go_kinesis_producer_user_records_data_put_bytes_bucket[1m])))", + "interval": "", + "legendFormat": "Histogram 0.95", + "refId": "B" }, { - "$$hashKey": "object:433", - "decimals": null, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "histogram_quantile(0.99, sum by (le) (rate(bidder_go_kinesis_producer_user_records_data_put_bytes_bucket[1m])))", + "interval": "", + "legendFormat": "Histogram 0.99", + "refId": "C" } ], - "yaxis": { - "align": false, - "alignLevel": null - } + "title": "Logical record sizes", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "decimals": 2, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "fieldConfig": { - "defaults": {}, - "overrides": [] + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Total size" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 35 + "y": 12 }, - "hiddenSeries": false, - "id": 40, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": false, - "hideZero": false, - "max": true, - "min": false, - "rightSide": false, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", + "id": 22, "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { - "expr": "sum(irate(bidder_cache_refresh_request_recurring[1m]))", - "hide": false, - "instant": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(irate(bidder_go_kinesis_producer_kinesis_records_put_total[1m]))", "interval": "", - "intervalFactor": 1, - "legendFormat": "Cache refresh requests count [recurring]", + "legendFormat": "Successful count", "refId": "A" }, { - "expr": "sum(irate(bidder_cache_refresh_request_on_demand[1m]))", - "hide": false, - "instant": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(irate(bidder_go_kinesis_producer_kinesis_records_data_put_bytes_sum[1m]))", "interval": "", - "intervalFactor": 1, - "legendFormat": "Cache refresh requests count [on demand]", + "legendFormat": "Total size", "refId": "B" }, { - "expr": "sum(irate(budget_update_time_count[1m]))", - "hide": false, - "instant": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum by (code) (irate(bidder_go_kinesis_producer_errors_by_code_total[1m]))", "interval": "", - "intervalFactor": 1, - "legendFormat": "Cache refreshes count", + "legendFormat": "{{code}} count", "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Cache refresh requests count", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true }, { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum(irate(bidder_go_kinesis_producer_retries_per_record_sum[1m]))", + "interval": "", + "legendFormat": "Retry count", + "refId": "D" } ], - "yaxis": { - "align": false, - "alignLevel": null - } + "title": "Kinesis puts", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "fieldConfig": { - "defaults": {}, + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 35 - }, - "hiddenSeries": false, - "id": 33, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false + "y": 12 }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", + "id": 29, "options": { - "alertThreshold": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { - "expr": "max by (quantile) (bidder_budget_update_time)", + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "histogram_quantile(0.5, sum by (le) (rate(bidder_go_kinesis_producer_kinesis_records_data_put_bytes_bucket[1m])))", "interval": "", - "legendFormat": "Budget update ({{quantile}})", + "legendFormat": "Histogram 0.5", "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Budget update latency", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ + }, { - "$$hashKey": "object:305", - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "histogram_quantile(0.95, sum by (le) (rate(bidder_go_kinesis_producer_kinesis_records_data_put_bytes_bucket[1m])))", + "interval": "", + "legendFormat": "Histogram 0.95", + "refId": "B" }, { - "$$hashKey": "object:306", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "histogram_quantile(0.99, sum by (le) (rate(bidder_go_kinesis_producer_kinesis_records_data_put_bytes_bucket[1m])))", + "interval": "", + "legendFormat": "Histogram 0.99", + "refId": "C" } ], - "yaxis": { - "align": false, - "alignLevel": null - } + "title": "Put record sizes", + "type": "timeseries" }, { - "collapsed": false, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 43 + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - "id": 12, - "panels": [], - "title": "Database", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "decimals": 2, "fieldConfig": { - "defaults": {}, + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 9, + "h": 8, "w": 12, "x": 0, - "y": 44 + "y": 20 }, - "hiddenSeries": false, - "id": 13, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideZero": false, - "max": true, - "min": false, - "rightSide": false, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", + "id": 23, "options": { - "alertThreshold": false - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (table_name, query_type) (irate(bidder_database_time_count[1m]))", - "format": "time_series", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "{{table_name}}, {{query_type}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Queries per table per second", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:371", - "decimals": 2, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - { - "$$hashKey": "object:372", - "decimals": null, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "decimals": 0, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 44 - }, - "hiddenSeries": false, - "id": 36, - "interval": "", - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideZero": false, - "max": true, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": true }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": false - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { - "expr": "max by (table_name, query_type) (irate(bidder_database_time[1m]))", - "format": "time_series", - "hide": false, - "instant": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "sum by (shard) (irate(bidder_go_kinesis_producer_kinesis_records_put_total[1m]))", "interval": "", - "intervalFactor": 1, - "legendFormat": "{{table_name}}, {{query_type}}", + "legendFormat": "{{shard}}", "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Queries per table latency", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:432", - "decimals": 2, - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:433", - "decimals": null, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "title": "Kinesis puts per shard", + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "decimals": 2, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "fieldConfig": { - "defaults": {}, + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { - "h": 9, + "h": 8, "w": 12, "x": 12, - "y": 53 - }, - "hiddenSeries": false, - "id": 35, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": false, - "hideZero": false, - "max": true, - "min": false, - "rightSide": false, - "show": true, - "total": true, - "values": true + "y": 20 }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", + "id": 28, "options": { - "alertThreshold": false + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { - "expr": "sum(irate(db_device_get_errors_number[1m]))", - "hide": false, - "instant": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "histogram_quantile(0.5, sum by (le) (rate(bidder_go_kinesis_producer_kinesis_records_per_put_records_request_bucket[1m])))", "interval": "", - "intervalFactor": 1, - "legendFormat": "DB get device errors count", + "legendFormat": "Histogram 0.5", "refId": "A" }, { - "expr": "sum(irate(db_audience_scan_errors_number[1m]))", - "hide": false, - "instant": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "histogram_quantile(0.95, sum by (le) (rate(bidder_go_kinesis_producer_kinesis_records_per_put_records_request_bucket[1m])))", "interval": "", - "intervalFactor": 1, - "legendFormat": "DB get device errors count", + "legendFormat": "Histogram 0.95", "refId": "B" }, { - "expr": "sum(irate(db_budget_scan_errors_number[1m]))", - "hide": false, - "instant": false, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "histogram_quantile(0.99, sum by (le) (rate(bidder_go_kinesis_producer_kinesis_records_per_put_records_request_bucket[1m])))", "interval": "", - "intervalFactor": 1, - "legendFormat": "DB get device errors count", + "legendFormat": "Histogram 0.99", "refId": "C" - }, - { - "expr": "sum(irate(db_campaign_scan_errors_number[1m]))", - "hide": false, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "DB get device errors count", - "refId": "D" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Database errors count", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:260", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:261", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true } ], - "yaxis": { - "align": false, - "alignLevel": null - } + "title": "Records per request", + "type": "timeseries" }, { - "collapsed": true, - "datasource": null, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 62 + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - "id": 16, - "panels": [ - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 63 - }, - "hiddenSeries": false, - "id": 18, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:116", - "alias": "Total size", - "yaxis": 2 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(irate(bidder_go_kinesis_producer_user_records_put_total[1m]))", - "interval": "", - "legendFormat": "Count", - "refId": "A" - }, - { - "expr": "sum(irate(bidder_go_kinesis_producer_user_records_data_put_bytes_sum[1m]))", - "interval": "", - "legendFormat": "Total size", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Logical records", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:134", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:135", - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 63 - }, - "hiddenSeries": false, - "id": 20, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.5, sum by (le) (rate(bidder_go_kinesis_producer_user_records_data_put_bytes_bucket[1m])))", - "interval": "", - "legendFormat": "Histogram 0.5", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.95, sum by (le) (rate(bidder_go_kinesis_producer_user_records_data_put_bytes_bucket[1m])))", - "interval": "", - "legendFormat": "Histogram 0.95", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.99, sum by (le) (rate(bidder_go_kinesis_producer_user_records_data_put_bytes_bucket[1m])))", - "interval": "", - "legendFormat": "Histogram 0.99", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Logical record sizes", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:280", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:281", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 71 - }, - "hiddenSeries": false, - "id": 22, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "$$hashKey": "object:417", - "alias": "Total size", - "yaxis": 2 - } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum(irate(bidder_go_kinesis_producer_kinesis_records_put_total[1m]))", - "interval": "", - "legendFormat": "Successful count", - "refId": "A" - }, - { - "expr": "sum(irate(bidder_go_kinesis_producer_kinesis_records_data_put_bytes_sum[1m]))", - "interval": "", - "legendFormat": "Total size", - "refId": "B" - }, - { - "expr": "sum by (code) (irate(bidder_go_kinesis_producer_errors_by_code_total[1m]))", - "interval": "", - "legendFormat": "{{code}} count", - "refId": "C" - }, - { - "expr": "sum(irate(bidder_go_kinesis_producer_retries_per_record_sum[1m]))", - "interval": "", - "legendFormat": "Retry count", - "refId": "D" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Kinesis puts", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:337", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:338", - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fieldConfig": { - "defaults": {}, - "overrides": [] + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 71 - }, - "hiddenSeries": false, - "id": 29, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.5, sum by (le) (rate(bidder_go_kinesis_producer_kinesis_records_data_put_bytes_bucket[1m])))", - "interval": "", - "legendFormat": "Histogram 0.5", - "refId": "A" + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - { - "expr": "histogram_quantile(0.95, sum by (le) (rate(bidder_go_kinesis_producer_kinesis_records_data_put_bytes_bucket[1m])))", - "interval": "", - "legendFormat": "Histogram 0.95", - "refId": "B" + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" }, - { - "expr": "histogram_quantile(0.99, sum by (le) (rate(bidder_go_kinesis_producer_kinesis_records_data_put_bytes_bucket[1m])))", - "interval": "", - "legendFormat": "Histogram 0.99", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Put record sizes", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:280", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" }, - { - "$$hashKey": "object:281", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "thresholdsStyle": { + "mode": "off" } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 28 + }, + "id": 26, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fieldConfig": { - "defaults": {}, - "overrides": [] + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 79 - }, - "hiddenSeries": false, - "id": 23, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum by (shard) (irate(bidder_go_kinesis_producer_kinesis_records_put_total[1m]))", - "interval": "", - "legendFormat": "{{shard}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Kinesis puts per shard", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:337", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:338", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "expr": "histogram_quantile(0.9, sum by (le) (rate(bidder_go_kinesis_producer_buffering_time_milliseconds_bucket[1m])))", + "interval": "", + "legendFormat": "Histogram 0.9", + "refId": "A" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fieldConfig": { - "defaults": {}, - "overrides": [] + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 79 - }, - "hiddenSeries": false, - "id": 28, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.5, sum by (le) (rate(bidder_go_kinesis_producer_kinesis_records_per_put_records_request_bucket[1m])))", - "interval": "", - "legendFormat": "Histogram 0.5", - "refId": "A" - }, - { - "expr": "histogram_quantile(0.95, sum by (le) (rate(bidder_go_kinesis_producer_kinesis_records_per_put_records_request_bucket[1m])))", - "interval": "", - "legendFormat": "Histogram 0.95", - "refId": "B" - }, - { - "expr": "histogram_quantile(0.99, sum by (le) (rate(bidder_go_kinesis_producer_kinesis_records_per_put_records_request_bucket[1m])))", - "interval": "", - "legendFormat": "Histogram 0.99", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Records per request", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:280", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "$$hashKey": "object:281", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "expr": "histogram_quantile(0.95, sum by (le) (rate(bidder_go_kinesis_producer_buffering_time_milliseconds_bucket[1m])))", + "interval": "", + "legendFormat": "Histogram 0.95", + "refId": "B" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fieldConfig": { - "defaults": {}, - "overrides": [] + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 87 - }, - "hiddenSeries": false, - "id": 26, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "histogram_quantile(0.9, sum by (le) (rate(bidder_go_kinesis_producer_buffering_time_milliseconds_bucket[1m])))", - "interval": "", - "legendFormat": "Histogram 0.9", - "refId": "A" + "expr": "histogram_quantile(0.99, sum by (le) (rate(bidder_go_kinesis_producer_buffering_time_milliseconds_bucket[1m])))", + "interval": "", + "legendFormat": "Histogram 0.99", + "refId": "C" + } + ], + "title": "Buffering time", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - { - "expr": "histogram_quantile(0.95, sum by (le) (rate(bidder_go_kinesis_producer_buffering_time_milliseconds_bucket[1m])))", - "interval": "", - "legendFormat": "Histogram 0.95", - "refId": "B" + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" }, - { - "expr": "histogram_quantile(0.99, sum by (le) (rate(bidder_go_kinesis_producer_buffering_time_milliseconds_bucket[1m])))", - "interval": "", - "legendFormat": "Histogram 0.99", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Buffering time", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:280", - "format": "ms", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" }, - { - "$$hashKey": "object:281", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "thresholdsStyle": { + "mode": "off" } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 28 + }, + "id": 27, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fieldConfig": { - "defaults": {}, - "overrides": [] + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 87 - }, - "hiddenSeries": false, - "id": 27, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "histogram_quantile(0.9, sum by (le) (rate(bidder_go_kinesis_producer_request_time_milliseconds_bucket[1m])))", - "interval": "", - "legendFormat": "Histogram 0.9", - "refId": "A" + "exemplar": true, + "expr": "histogram_quantile(0.9, sum by (le) (rate(bidder_go_kinesis_producer_request_time_milliseconds_bucket[1m])))", + "interval": "", + "legendFormat": "Histogram 0.9", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "histogram_quantile(0.95, sum by (le) (rate(bidder_go_kinesis_producer_request_time_milliseconds_bucket[1m])))", + "interval": "", + "legendFormat": "Histogram 0.95", + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "expr": "histogram_quantile(0.99, sum by (le) (rate(bidder_go_kinesis_producer_request_time_milliseconds_bucket[1m])))", + "interval": "", + "legendFormat": "Histogram 0.99", + "refId": "C" + } + ], + "title": "Request time", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false }, - { - "expr": "histogram_quantile(0.95, sum by (le) (rate(bidder_go_kinesis_producer_request_time_milliseconds_bucket[1m])))", - "interval": "", - "legendFormat": "Histogram 0.95", - "refId": "B" + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" }, - { - "expr": "histogram_quantile(0.99, sum by (le) (rate(bidder_go_kinesis_producer_request_time_milliseconds_bucket[1m])))", - "interval": "", - "legendFormat": "Histogram 0.99", - "refId": "C" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Request time", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:280", - "format": "ms", - "label": null, - "logBase": 1, - "max": null, - "min": "0", - "show": true + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" }, - { - "$$hashKey": "object:281", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "thresholdsStyle": { + "mode": "off" } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 36 + }, + "id": 41, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, + "tooltip": { + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "10.4.1", + "targets": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "fieldConfig": { - "defaults": {}, - "overrides": [] + "datasource": { + "type": "prometheus", + "uid": "prometheus" }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 95 - }, - "hiddenSeries": false, - "id": 41, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": true, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.5.3", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "exemplar": true, - "expr": "max(bidder_go_kinesis_producer_input_buffer_size)", - "interval": "", - "legendFormat": "Input buffer", - "refId": "A" - }, - { - "exemplar": true, - "expr": "max(bidder_go_kinesis_producer_output_buffer_size)", - "hide": false, - "interval": "", - "legendFormat": "Output buffer", - "refId": "B" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Kinesis producer buffer sizes", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "$$hashKey": "object:113", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "$$hashKey": "object:114", - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "exemplar": true, + "expr": "max(bidder_go_kinesis_producer_input_buffer_size)", + "interval": "", + "legendFormat": "Input buffer", + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "exemplar": true, + "expr": "max(bidder_go_kinesis_producer_output_buffer_size)", + "hide": false, + "interval": "", + "legendFormat": "Output buffer", + "refId": "B" } ], - "title": "Kinesis producer", - "type": "row" + "title": "Kinesis producer buffer sizes", + "type": "timeseries" } ], "refresh": "10s", - "schemaVersion": 27, - "style": "dark", + "schemaVersion": 39, "tags": [], "templating": { "list": [] @@ -2359,5 +2611,6 @@ "timezone": "", "title": "Bidder", "uid": "9BDpvv-Mz", - "version": 1 -} + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/deployment/infrastructure/deployment/prometheus/dashboards/cloudwatch-dax.json b/deployment/infrastructure/deployment/prometheus/dashboards/cloudwatch-dax.json index fb91b01..6033e7a 100644 --- a/deployment/infrastructure/deployment/prometheus/dashboards/cloudwatch-dax.json +++ b/deployment/infrastructure/deployment/prometheus/dashboards/cloudwatch-dax.json @@ -3,7 +3,10 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -13,232 +16,274 @@ ] }, "editable": true, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 27, - "iteration": 1615552904635, "links": [], "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "cloudwatch", + "datasource": { + "type": "cloudwatch", + "uid": "P561CB7FAE9DC47C2" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 13, "w": 12, "x": 0, "y": 0 }, - "hiddenSeries": false, "id": 2, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { "alias": "Hits", + "datasource": { + "type": "cloudwatch", + "uid": "P561CB7FAE9DC47C2" + }, "dimensions": { "ClusterId": "$ClusterId" }, "expression": "", "id": "", + "label": "Hits", "matchExact": true, + "metricEditorMode": 0, "metricName": "ItemCacheHits", + "metricQueryType": 0, "namespace": "AWS/DAX", "period": "", "refId": "A", "region": "default", - "statistics": [ - "Sum" - ] + "statistic": "Sum" }, { "alias": "Missies", + "datasource": { + "type": "cloudwatch", + "uid": "P561CB7FAE9DC47C2" + }, "dimensions": { "ClusterId": "$ClusterId" }, "expression": "", "id": "", + "label": "Missies", "matchExact": true, + "metricEditorMode": 0, "metricName": "ItemCacheMisses", + "metricQueryType": 0, "namespace": "AWS/DAX", "period": "", "refId": "B", "region": "default", - "statistics": [ - "Sum" - ] + "statistic": "Sum" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Item cache hits/misses", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "transformations": [], - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "cloudwatch", + "datasource": { + "type": "cloudwatch", + "uid": "P561CB7FAE9DC47C2" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 13, "w": 12, "x": 12, "y": 0 }, - "hiddenSeries": false, "id": 3, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "rightSide": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { "alias": "Hits", + "datasource": { + "type": "cloudwatch", + "uid": "P561CB7FAE9DC47C2" + }, "dimensions": { "ClusterId": "$ClusterId" }, "expression": "", "id": "", + "label": "Hits", "matchExact": true, + "metricEditorMode": 0, "metricName": "ItemCacheHits", + "metricQueryType": 0, "namespace": "AWS/DAX", "period": "", "refId": "A", "region": "default", - "statistics": [ - "Sum" - ] + "statistic": "Sum" }, { "alias": "Missies", + "datasource": { + "type": "cloudwatch", + "uid": "P561CB7FAE9DC47C2" + }, "dimensions": { "ClusterId": "$ClusterId" }, "expression": "", "id": "", + "label": "Missies", "matchExact": true, + "metricEditorMode": 0, "metricName": "ItemCacheMisses", + "metricQueryType": 0, "namespace": "AWS/DAX", "period": "", "refId": "B", "region": "default", - "statistics": [ - "Sum" - ] + "statistic": "Sum" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Item cache hits/misses ratio", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, "transformations": [ { "id": "calculateField", @@ -303,58 +348,29 @@ } } ], - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": null, - "format": "percentunit", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" } ], "refresh": "1m", - "schemaVersion": 26, - "style": "dark", + "schemaVersion": 39, "tags": [], "templating": { "list": [ { "allValue": "", "current": { + "isNone": true, "selected": false, - "text": "", + "text": "None", "value": "" }, - "datasource": "cloudwatch", + "datasource": { + "type": "cloudwatch", + "uid": "P561CB7FAE9DC47C2" + }, "definition": "dimension_values(default,AWS/DAX,ItemCacheHits,ClusterId)", - "error": null, "hide": 0, "includeAll": false, - "label": null, "multi": false, "name": "ClusterId", "options": [], @@ -364,8 +380,6 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], - "tagsQuery": "Name", "type": "query", "useTags": false } @@ -379,5 +393,6 @@ "timezone": "", "title": "AWS DAX", "uid": "dax", - "version": 1 -} + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/deployment/infrastructure/deployment/prometheus/dashboards/cloudwatch-nlb.json b/deployment/infrastructure/deployment/prometheus/dashboards/cloudwatch-nlb.json index 69762a9..298e387 100644 --- a/deployment/infrastructure/deployment/prometheus/dashboards/cloudwatch-nlb.json +++ b/deployment/infrastructure/deployment/prometheus/dashboards/cloudwatch-nlb.json @@ -3,7 +3,10 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -14,78 +17,121 @@ }, "description": "Visualize AWS Network Load Balancer metrics", "editable": true, + "fiscalYearStartMonth": 0, "gnetId": 12111, "graphTooltip": 0, - "id": 27, - "iteration": 1610355558190, "links": [], "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "editable": true, - "error": false, + "datasource": { + "type": "cloudwatch", + "uid": "$datasource" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "TargetResponseTime_Average" + }, + "properties": [ + { + "id": "unit", + "value": "s" + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, - "grid": {}, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 0 }, - "hiddenSeries": false, "id": 7, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "TargetResponseTime_Average", - "yaxis": 2 + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "10.4.1", "targets": [ { "alias": "", "application": { "filter": "" }, + "datasource": { + "uid": "$datasource" + }, "dimensions": { "LoadBalancer": "$loadbalancername" }, @@ -102,8 +148,11 @@ "item": { "filter": "" }, + "label": "", "matchExact": true, + "metricEditorMode": 0, "metricName": "ActiveFlowCount", + "metricQueryType": 0, "mode": 0, "namespace": "AWS/NetworkELB", "options": { @@ -113,15 +162,16 @@ "refId": "A", "region": "$region", "returnData": false, - "statistics": [ - "Sum" - ] + "statistic": "Sum" }, { "alias": "", "application": { "filter": "" }, + "datasource": { + "uid": "$datasource" + }, "dimensions": { "LoadBalancer": "$loadbalancername" }, @@ -138,8 +188,11 @@ "item": { "filter": "" }, + "label": "", "matchExact": true, + "metricEditorMode": 0, "metricName": "NewFlowCount", + "metricQueryType": 0, "mode": 0, "namespace": "AWS/NetworkELB", "options": { @@ -149,116 +202,109 @@ "refId": "B", "region": "$region", "returnData": false, - "statistics": [ - "Average" - ] + "statistic": "Average" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Net /Active Flow Count", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "none", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": null, - "editable": true, - "error": false, + "datasource": { + "type": "cloudwatch", + "uid": "$datasource" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, - "grid": {}, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 0 }, - "hiddenSeries": false, "id": 10, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "sort": null, - "sortDesc": null, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { "alias": "", "application": { "filter": "" }, + "datasource": { + "uid": "$datasource" + }, "dimensions": { "LoadBalancer": "$loadbalancername" }, @@ -275,8 +321,11 @@ "item": { "filter": "" }, + "label": "", "matchExact": true, + "metricEditorMode": 0, "metricName": "NewFlowCount_TLS", + "metricQueryType": 0, "mode": 0, "namespace": "AWS/NetworkELB", "options": { @@ -286,15 +335,16 @@ "refId": "D", "region": "$region", "returnData": false, - "statistics": [ - "Average" - ] + "statistic": "Average" }, { "alias": "", "application": { "filter": "" }, + "datasource": { + "uid": "$datasource" + }, "dimensions": { "LoadBalancer": "$loadbalancername" }, @@ -311,8 +361,11 @@ "item": { "filter": "" }, + "label": "", "matchExact": true, + "metricEditorMode": 0, "metricName": "ActiveFlowCount_TLS", + "metricQueryType": 0, "mode": 0, "namespace": "AWS/NetworkELB", "options": { @@ -322,116 +375,109 @@ "refId": "C", "region": "$region", "returnData": false, - "statistics": [ - "Average" - ] + "statistic": "Average" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "New / Active Flow Count TLS", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "none", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "decimals": null, - "editable": true, - "error": false, + "datasource": { + "type": "cloudwatch", + "uid": "$datasource" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, - "grid": {}, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 7 }, - "hiddenSeries": false, "id": 12, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "sort": null, - "sortDesc": null, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { "alias": "", "application": { "filter": "" }, + "datasource": { + "uid": "$datasource" + }, "dimensions": { "LoadBalancer": "$loadbalancername", "TargetGroup": "*" @@ -449,8 +495,11 @@ "item": { "filter": "" }, + "label": "", "matchExact": true, + "metricEditorMode": 0, "metricName": "HealthyHostCount", + "metricQueryType": 0, "mode": 0, "namespace": "AWS/NetworkELB", "options": { @@ -460,15 +509,16 @@ "refId": "D", "region": "$region", "returnData": false, - "statistics": [ - "Average" - ] + "statistic": "Average" }, { "alias": "", "application": { "filter": "" }, + "datasource": { + "uid": "$datasource" + }, "dimensions": { "LoadBalancer": "$loadbalancername", "TargetGroup": "*" @@ -486,8 +536,11 @@ "item": { "filter": "" }, + "label": "", "matchExact": true, + "metricEditorMode": 0, "metricName": "UnHealthyHostCount", + "metricQueryType": 0, "mode": 0, "namespace": "AWS/NetworkELB", "options": { @@ -497,120 +550,121 @@ "refId": "A", "region": "$region", "returnData": false, - "statistics": [ - "Average" - ] + "statistic": "Average" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Healthy / Unhealthy Hosts Count", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "none", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "editable": true, - "error": false, + "datasource": { + "type": "cloudwatch", + "uid": "$datasource" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "ProcessedBytes_Average" + }, + "properties": [ + { + "id": "unit", + "value": "bytes" + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, - "grid": {}, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 7 }, - "hiddenSeries": false, "id": 8, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "connected", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "ProcessedBytes_Average", - "yaxis": 2 + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + }, + "pluginVersion": "10.4.1", "targets": [ { "alias": "", "application": { "filter": "" }, + "datasource": { + "uid": "$datasource" + }, "dimensions": { "LoadBalancer": "$loadbalancername" }, @@ -627,8 +681,11 @@ "item": { "filter": "" }, + "label": "", "matchExact": true, + "metricEditorMode": 0, "metricName": "ProcessedBytes", + "metricQueryType": 0, "mode": 0, "namespace": "AWS/NetworkELB", "options": { @@ -638,15 +695,16 @@ "refId": "A", "region": "$region", "returnData": false, - "statistics": [ - "Average" - ] + "statistic": "Average" }, { "alias": "", "application": { "filter": "" }, + "datasource": { + "uid": "$datasource" + }, "dimensions": { "LoadBalancer": "$loadbalancername" }, @@ -663,8 +721,11 @@ "item": { "filter": "" }, + "label": "", "matchExact": true, + "metricEditorMode": 0, "metricName": "ConsumedLCUs", + "metricQueryType": 0, "mode": 0, "namespace": "AWS/NetworkELB", "options": { @@ -674,114 +735,109 @@ "refId": "B", "region": "$region", "returnData": false, - "statistics": [ - "Average" - ] + "statistic": "Average" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "ConsumedLCUs / ProcessedBytes", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "none", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "editable": true, - "error": false, + "datasource": { + "type": "cloudwatch", + "uid": "$datasource" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, - "grid": {}, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 15 }, - "hiddenSeries": false, "id": 11, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "sort": null, - "sortDesc": null, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": true, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { "alias": "", "application": { "filter": "" }, + "datasource": { + "uid": "$datasource" + }, "dimensions": { "LoadBalancer": "$loadbalancername" }, @@ -798,8 +854,11 @@ "item": { "filter": "" }, + "label": "", "matchExact": true, + "metricEditorMode": 0, "metricName": "ClientTLSNegotiationErrorCount", + "metricQueryType": 0, "mode": 0, "namespace": "AWS/NetworkELB", "options": { @@ -809,15 +868,16 @@ "refId": "D", "region": "$region", "returnData": false, - "statistics": [ - "Sum" - ] + "statistic": "Sum" }, { "alias": "", "application": { "filter": "" }, + "datasource": { + "uid": "$datasource" + }, "dimensions": { "LoadBalancer": "$loadbalancername" }, @@ -834,8 +894,11 @@ "item": { "filter": "" }, + "label": "", "matchExact": true, + "metricEditorMode": 0, "metricName": "TargetTLSNegotiationErrorCount", + "metricQueryType": 0, "mode": 0, "namespace": "AWS/NetworkELB", "options": { @@ -845,120 +908,122 @@ "refId": "C", "region": "$region", "returnData": false, - "statistics": [ - "Sum" - ] + "statistic": "Sum" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "TLSNegotiationErrorCount", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "none", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": false - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "$datasource", - "editable": true, - "error": false, + "datasource": { + "type": "cloudwatch", + "uid": "$datasource" + }, "fieldConfig": { "defaults": { - "custom": {}, - "links": [] + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" }, - "overrides": [] + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "IPv6ProcessedBytes_Sum" + }, + "properties": [ + { + "id": "unit", + "value": "decbytes" + } + ] + } + ] }, - "fill": 1, - "fillGradient": 0, - "grid": {}, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 15 }, - "hiddenSeries": false, "id": 15, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": true, - "show": true, - "sort": null, - "sortDesc": null, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null as zero", "options": { - "alertThreshold": true - }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "IPv6ProcessedBytes_Sum", - "yaxis": 2 + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" } - ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, + }, + "pluginVersion": "10.4.1", "targets": [ { "alias": "", "application": { "filter": "" }, + "datasource": { + "uid": "$datasource" + }, "dimensions": { "LoadBalancer": "$loadbalancername" }, @@ -975,8 +1040,11 @@ "item": { "filter": "" }, + "label": "", "matchExact": true, + "metricEditorMode": 0, "metricName": "TCP_Client_Reset_Count", + "metricQueryType": 0, "mode": 0, "namespace": "AWS/NetworkELB", "options": { @@ -986,15 +1054,16 @@ "refId": "D", "region": "$region", "returnData": false, - "statistics": [ - "Sum" - ] + "statistic": "Sum" }, { "alias": "", "application": { "filter": "" }, + "datasource": { + "uid": "$datasource" + }, "dimensions": { "LoadBalancer": "$loadbalancername" }, @@ -1011,8 +1080,11 @@ "item": { "filter": "" }, + "label": "", "matchExact": true, + "metricEditorMode": 0, "metricName": "TCP_ELB_Reset_Count", + "metricQueryType": 0, "mode": 0, "namespace": "AWS/NetworkELB", "options": { @@ -1022,15 +1094,16 @@ "refId": "A", "region": "$region", "returnData": false, - "statistics": [ - "Sum" - ] + "statistic": "Sum" }, { "alias": "", "application": { "filter": "" }, + "datasource": { + "uid": "$datasource" + }, "dimensions": { "LoadBalancer": "$loadbalancername" }, @@ -1047,8 +1120,11 @@ "item": { "filter": "" }, + "label": "", "matchExact": true, + "metricEditorMode": 0, "metricName": "TCP_Target_Reset_Count", + "metricQueryType": 0, "mode": 0, "namespace": "AWS/NetworkELB", "options": { @@ -1058,59 +1134,15 @@ "refId": "B", "region": "$region", "returnData": false, - "statistics": [ - "Sum" - ] + "statistic": "Sum" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "TCP", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "none", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - }, - { - "decimals": null, - "format": "decbytes", - "label": null, - "logBase": 1, - "max": null, - "min": 0, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" } ], "refresh": "10s", - "schemaVersion": 26, - "style": "dark", + "schemaVersion": 39, "tags": [ "monitoringartist", "cloudwatch" @@ -1121,9 +1153,8 @@ "current": { "selected": false, "text": "cloudwatch", - "value": "cloudwatch" + "value": "P561CB7FAE9DC47C2" }, - "error": null, "hide": 0, "includeAll": false, "label": "Datasource", @@ -1137,15 +1168,16 @@ "type": "datasource" }, { - "allValue": null, "current": { "selected": false, "text": "default", "value": "default" }, - "datasource": "$datasource", + "datasource": { + "type": "cloudwatch", + "uid": "$datasource" + }, "definition": "regions()", - "error": null, "hide": 0, "includeAll": false, "label": "Region", @@ -1158,21 +1190,22 @@ "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false }, { - "allValue": null, "current": { - "selected": true, - "text": "net/aa96b8f34e6a4474da4c2566dbbcba02/bfa2c1de40bf041e", - "value": "net/aa96b8f34e6a4474da4c2566dbbcba02/bfa2c1de40bf041e" + "isNone": true, + "selected": false, + "text": "None", + "value": "" + }, + "datasource": { + "type": "cloudwatch", + "uid": "$datasource" }, - "datasource": "$datasource", "definition": "dimension_values($region,AWS/NetworkELB, ActiveFlowCount ,LoadBalancer)", - "error": null, "hide": 0, "includeAll": false, "label": "LoadBalancerName", @@ -1185,7 +1218,6 @@ "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", - "tags": [], "tagsQuery": "", "type": "query", "useTags": false @@ -1224,5 +1256,6 @@ "timezone": "browser", "title": "AWS Network Load Balancer (NLB)", "uid": "bt8qGKJZz", - "version": 2 -} + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/deployment/infrastructure/deployment/prometheus/dashboards/cloudwatch.json b/deployment/infrastructure/deployment/prometheus/dashboards/cloudwatch.json index bc21f78..d2948e8 100644 --- a/deployment/infrastructure/deployment/prometheus/dashboards/cloudwatch.json +++ b/deployment/infrastructure/deployment/prometheus/dashboards/cloudwatch.json @@ -3,7 +3,10 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -13,14 +16,16 @@ ] }, "editable": true, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 26, "links": [], "panels": [ { "collapsed": false, - "datasource": null, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "gridPos": { "h": 1, "w": 24, @@ -29,242 +34,317 @@ }, "id": 5, "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "refId": "A" + } + ], "title": "Load balancer", "type": "row" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "cloudwatch", + "datasource": { + "type": "cloudwatch", + "uid": "P561CB7FAE9DC47C2" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 9, "w": 12, "x": 0, "y": 1 }, - "hiddenSeries": false, "id": 2, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "sum" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.2.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { "alias": "", + "datasource": { + "type": "cloudwatch", + "uid": "P561CB7FAE9DC47C2" + }, "dimensions": {}, "expression": "", "id": "", + "label": "", "matchExact": true, + "metricEditorMode": 0, "metricName": "RequestCount", + "metricQueryType": 0, "namespace": "AWS/ELB", "period": "", "refId": "A", "region": "default", - "statistics": [ - "Sum" - ] + "statistic": "Sum" }, { "alias": "", + "datasource": { + "type": "cloudwatch", + "uid": "P561CB7FAE9DC47C2" + }, "dimensions": {}, "expression": "", "id": "", + "label": "", "matchExact": true, + "metricEditorMode": 0, "metricName": "SpilloverCount", + "metricQueryType": 0, "namespace": "AWS/ELB", "period": "", "refId": "B", "region": "default", - "statistics": [ - "Sum" - ] + "statistic": "Sum" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Load balancer throughput per minute", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "cloudwatch", + "datasource": { + "type": "cloudwatch", + "uid": "P561CB7FAE9DC47C2" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 9, "w": 12, "x": 12, "y": 1 }, - "hiddenSeries": false, "id": 3, - "legend": { - "alignAsTable": true, - "avg": true, - "current": false, - "max": true, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.2.1", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { "alias": "", + "datasource": { + "type": "cloudwatch", + "uid": "P561CB7FAE9DC47C2" + }, "dimensions": {}, "expression": "", "id": "", + "label": "", "matchExact": true, + "metricEditorMode": 0, "metricName": "Latency", + "metricQueryType": 0, "namespace": "AWS/ELB", "period": "", "refId": "A", "region": "default", - "statistics": [ - "Average", - "p90", - "p95", - "p99" - ] - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Request latency on load balancer", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ + "statistic": "Average" + }, + { + "alias": "", + "datasource": { + "type": "cloudwatch", + "uid": "P561CB7FAE9DC47C2" + }, + "dimensions": {}, + "expression": "", + "id": "", + "label": "", + "matchExact": true, + "metricEditorMode": 0, + "metricName": "Latency", + "metricQueryType": 0, + "namespace": "AWS/ELB", + "period": "", + "refId": "B", + "region": "default", + "statistic": "p90" + }, { - "format": "s", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "alias": "", + "datasource": { + "type": "cloudwatch", + "uid": "P561CB7FAE9DC47C2" + }, + "dimensions": {}, + "expression": "", + "id": "", + "label": "", + "matchExact": true, + "metricEditorMode": 0, + "metricName": "Latency", + "metricQueryType": 0, + "namespace": "AWS/ELB", + "period": "", + "refId": "C", + "region": "default", + "statistic": "p95" }, { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "alias": "", + "datasource": { + "type": "cloudwatch", + "uid": "P561CB7FAE9DC47C2" + }, + "dimensions": {}, + "expression": "", + "id": "", + "label": "", + "matchExact": true, + "metricEditorMode": 0, + "metricName": "Latency", + "metricQueryType": 0, + "namespace": "AWS/ELB", + "period": "", + "refId": "D", + "region": "default", + "statistic": "p99" } ], - "yaxis": { - "align": false, - "alignLevel": null - } + "title": "Request latency on load balancer", + "type": "timeseries" } ], "refresh": "30s", - "schemaVersion": 26, - "style": "dark", + "schemaVersion": 39, "tags": [], "templating": { "list": [] @@ -277,5 +357,6 @@ "timezone": "", "title": "AWS Cloudwatch", "uid": "QGBJL0aMz", - "version": 4 -} + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/deployment/infrastructure/deployment/prometheus/dashboards/file-descriptors.json b/deployment/infrastructure/deployment/prometheus/dashboards/file-descriptors.json index 05d907f..9d09ea4 100644 --- a/deployment/infrastructure/deployment/prometheus/dashboards/file-descriptors.json +++ b/deployment/infrastructure/deployment/prometheus/dashboards/file-descriptors.json @@ -3,7 +3,10 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -13,221 +16,231 @@ ] }, "editable": true, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 27, "links": [], "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "decimals": null, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 15, "w": 12, "x": 0, "y": 0 }, - "hiddenSeries": false, "id": 3, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum(bidder_process_open_fds)", "interval": "", "legendFormat": "bidder ", "refId": "C" }, { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum(container_file_descriptors{pod=~\"bidder.*\"})", "interval": "", "legendFormat": "bidder (reporter by Kubelet)", "refId": "A" }, { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum(container_file_descriptors{pod=~\"load-generator.*\"})", "interval": "", "legendFormat": "load-generator (reporter by Kubelet)", "refId": "B" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Open file descriptiors", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, - "decimals": null, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 15, "w": 12, "x": 12, "y": 0 }, - "hiddenSeries": false, "id": 4, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum by (pool) (node_filefd_allocated)", "interval": "", "legendFormat": "{{pool}}", "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Allocated file descriptors by node pool", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" } ], "refresh": "10s", - "schemaVersion": 26, - "style": "dark", + "schemaVersion": 39, "tags": [], "templating": { "list": [] @@ -240,5 +253,6 @@ "timezone": "", "title": "File descriptors", "uid": "mOVlyuLGk", - "version": 2 -} + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/deployment/infrastructure/deployment/prometheus/dashboards/sockets-tcp.json b/deployment/infrastructure/deployment/prometheus/dashboards/sockets-tcp.json index 38627cc..d482204 100644 --- a/deployment/infrastructure/deployment/prometheus/dashboards/sockets-tcp.json +++ b/deployment/infrastructure/deployment/prometheus/dashboards/sockets-tcp.json @@ -3,7 +3,10 @@ "list": [ { "builtIn": 1, - "datasource": "-- Grafana --", + "datasource": { + "type": "datasource", + "uid": "grafana" + }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", @@ -13,110 +16,115 @@ ] }, "editable": true, - "gnetId": null, + "fiscalYearStartMonth": 0, "graphTooltip": 0, - "id": 28, "links": [], "panels": [ { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 13, "w": 24, "x": 0, "y": 0 }, - "hiddenSeries": false, "id": 2, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum by (pool) (node_sockstat_sockets_used)", "interval": "", "legendFormat": "{{pool}}", "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Sockets used", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { "collapsed": false, - "datasource": null, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "gridPos": { "h": 1, "w": 24, @@ -125,396 +133,416 @@ }, "id": 6, "panels": [], + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, + "refId": "A" + } + ], "title": "TCP", "type": "row" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 11, "w": 12, "x": 0, "y": 14 }, - "hiddenSeries": false, "id": 4, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum by (pool) (node_sockstat_TCP_alloc)", "interval": "", "legendFormat": "{{pool}}", "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "TCP connections in alloc state", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 11, "w": 12, "x": 12, "y": 14 }, - "hiddenSeries": false, "id": 7, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum by (pool) (node_sockstat_TCP_inuse)", "interval": "", "legendFormat": "{{pool}}", "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "TCP connections in in-use state", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 11, "w": 12, "x": 0, "y": 25 }, - "hiddenSeries": false, "id": 8, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum by (pool) (node_sockstat_TCP_orphan)", "interval": "", "legendFormat": "{{pool}}", "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "TCP connections in orphan state", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" }, { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": null, + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "fieldConfig": { "defaults": { - "custom": {} + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" }, "overrides": [] }, - "fill": 1, - "fillGradient": 0, "gridPos": { "h": 11, "w": 12, "x": 12, "y": 25 }, - "hiddenSeries": false, "id": 9, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": true, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", "options": { - "alertThreshold": true + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "multi", + "sort": "none" + } }, - "percentage": false, - "pluginVersion": "7.3.5", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, + "pluginVersion": "10.4.1", "targets": [ { + "datasource": { + "type": "prometheus", + "uid": "prometheus" + }, "expr": "sum by (pool) (node_sockstat_TCP_tw)", "interval": "", "legendFormat": "{{pool}}", "refId": "A" } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "TCP connections in time-wait state", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "timeseries" } ], - "schemaVersion": 26, - "style": "dark", + "schemaVersion": 39, "tags": [], "templating": { "list": [] @@ -527,5 +555,6 @@ "timezone": "", "title": "Sockets and TCP Copy", "uid": "gXTM_XYGk", - "version": 2 -} + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/deployment/infrastructure/deployment/prometheus/prometheus-values.yaml b/deployment/infrastructure/deployment/prometheus/prometheus-values.yaml index 3142f40..c1364ac 100644 --- a/deployment/infrastructure/deployment/prometheus/prometheus-values.yaml +++ b/deployment/infrastructure/deployment/prometheus/prometheus-values.yaml @@ -46,7 +46,8 @@ defaultRules: kubernetesResources: true kubernetesStorage: true kubernetesSystem: true - kubeScheduler: true + kubeSchedulerAlerting: true + kubeSchedulerRecording: true kubeStateMetrics: true network: true node: true @@ -369,7 +370,8 @@ alertmanager: ## Image of Alertmanager ## image: - repository: quay.io/prometheus/alertmanager + registry: quay.io + repository: prometheus/alertmanager tag: v0.21.0 sha: "" @@ -561,7 +563,7 @@ alertmanager: ## PortName to use for Alert Manager. ## - portName: "web" + portName: "http-web" ## ClusterAdvertiseAddress is the explicit address to advertise in cluster. Needs to be provided for non RFC1918 [1] (public) addresses. [1] RFC1918: https://tools.ietf.org/html/rfc1918 ## @@ -629,7 +631,11 @@ grafana: ## Annotations for Grafana dashboard configmaps ## annotations: {} - multicluster: false + multicluster: + global: + enabled: false + etcd: + enabled: false datasources: enabled: true defaultDatasourceEnabled: true @@ -676,7 +682,7 @@ grafana: ## Passed to grafana subchart and used by servicemonitor below ## service: - portName: service + portName: http-web ## If true, create a serviceMonitor for grafana ## @@ -1444,23 +1450,26 @@ prometheusOperator: ## Prometheus-operator image ## image: - repository: quay.io/prometheus-operator/prometheus-operator - tag: v0.44.0 + registry: quay.io + repository: prometheus-operator/prometheus-operator + tag: v0.74.0 sha: "" pullPolicy: IfNotPresent ## Configmap-reload image to use for reloading configmaps ## configmapReloadImage: - repository: docker.io/jimmidyson/configmap-reload + registry: docker.io + repository: jimmidyson/configmap-reload tag: v0.4.0 sha: "" ## Prometheus-config-reloader image to use for config and rule reloading ## prometheusConfigReloaderImage: - repository: quay.io/prometheus-operator/prometheus-config-reloader - tag: v0.44.0 + registry: quay.io + repository: prometheus-operator/prometheus-config-reloader + tag: v0.74.0 sha: "" ## Set the prometheus config reloader side-car CPU limit @@ -1736,8 +1745,9 @@ prometheus: ## Image of Prometheus. ## image: - repository: quay.io/prometheus/prometheus - tag: v2.22.1 + registry: quay.io + repository: prometheus/prometheus + tag: v2.49.1 sha: "" ## Tolerations for use with node taints @@ -2130,7 +2140,7 @@ prometheus: ## PortName to use for Prometheus. ## - portName: "web" + portName: "http-web" ## ArbitraryFSAccessThroughSMs configures whether configuration based on a service monitor can access arbitrary files ## on the file system of the Prometheus container e.g. bearer token files. diff --git a/deployment/infrastructure/templates/cloud9.yaml b/deployment/infrastructure/templates/cloud9.yaml index 930482e..5e6e10c 100644 --- a/deployment/infrastructure/templates/cloud9.yaml +++ b/deployment/infrastructure/templates/cloud9.yaml @@ -20,7 +20,6 @@ Resources: Path: /service-role/ ManagedPolicyArns: - arn:aws:iam::aws:policy/AWSCloud9SSMInstanceProfile - - arn:aws:iam::aws:policy/AWSCodeCommitFullAccess AssumeRolePolicyDocument: | { "Version": "2012-10-17", @@ -59,7 +58,7 @@ Resources: - - !Ref RootStackName - '-cloud9Instance' Repositories: - - RepositoryUrl: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/RTBCodeKitRepo + - RepositoryUrl: https://github.com/owner/aws-rtbkit PathComponent: /RTBCodeKitRepo SubnetId: !Ref Subnet04 # TODO pull the subnet info using function diff --git a/deployment/infrastructure/templates/eks.yaml b/deployment/infrastructure/templates/eks.yaml index 3ddb17b..6d4c214 100644 --- a/deployment/infrastructure/templates/eks.yaml +++ b/deployment/infrastructure/templates/eks.yaml @@ -10,7 +10,7 @@ Parameters: EksClusterVersion: Type: String Description: Version of EKS cluster - Default: '1.22' + Default: '1.30' EksVpcId: Type: String @@ -35,7 +35,7 @@ Parameters: NodeGroupReleaseVersion: Type: String Description: Release version of the Node group - Default: "1.22.17-20230217" + Default: "1.30.2-20240729" BasicArmNodeGroupSize: Type: Number diff --git a/deployment/infrastructure/templates/vpc.yaml b/deployment/infrastructure/templates/vpc.yaml index 1173dc4..55068b8 100644 --- a/deployment/infrastructure/templates/vpc.yaml +++ b/deployment/infrastructure/templates/vpc.yaml @@ -315,7 +315,6 @@ Resources: # Path: /service-role/ # ManagedPolicyArns: # - arn:aws:iam::aws:policy/AWSCloud9SSMInstanceProfile -# - arn:aws:iam::aws:policy/AWSCodeCommitFullAccess # AssumeRolePolicyDocument: | # { # "Version": "2012-10-17", @@ -355,7 +354,7 @@ Resources: # - - !Ref RootStackName # - '-cloud9Instance' # Repositories: -# - RepositoryUrl: https://git-codecommit.us-west-2.amazonaws.com/v1/repos/RTBCodeKitRepo +# - RepositoryUrl: https://github.com/owner/aws-rtbkit # PathComponent: /RTBCodeKitRepo # SubnetId: !Ref Subnet04 @@ -368,7 +367,7 @@ Outputs: - !Join [ ",", [ !Ref Subnet01, !Ref Subnet02, !Ref Subnet03 ] ] - !Join [ ",", [ !Ref Subnet01, !Ref Subnet02 ] ] SubnetId: - Description: cloud9 subnet id + Description: subnet id Value: !Ref Subnet04 VpcId: @@ -385,12 +384,4 @@ Outputs: PrivateRouteTableId: Description: Route table Id - Value: !Ref PrivateRouteTable - -# Cloud9IDEURL: -# Value: !Sub https://${AWS::Region}.console.aws.amazon.com/cloud9/ide/${C9Instance}?region=${AWS::Region}= -# -# Cloud9EnvID: -# Description: cloud9 instance enevironment ID -# Value: !Ref C9Instance - + Value: !Ref PrivateRouteTable \ No newline at end of file diff --git a/images/aws-rtb-grafana-bidder.png b/images/aws-rtb-grafana-bidder.png new file mode 100644 index 0000000..424cd15 Binary files /dev/null and b/images/aws-rtb-grafana-bidder.png differ diff --git a/images/aws-rtb-grafana-dashboards.png b/images/aws-rtb-grafana-dashboards.png new file mode 100644 index 0000000..065a9ed Binary files /dev/null and b/images/aws-rtb-grafana-dashboards.png differ diff --git a/images/aws-rtb-grafana-login.png b/images/aws-rtb-grafana-login.png new file mode 100644 index 0000000..d4e7d05 Binary files /dev/null and b/images/aws-rtb-grafana-login.png differ diff --git a/images/cloud9-graphana-preview.png b/images/cloud9-graphana-preview.png new file mode 100644 index 0000000..1f6f201 Binary files /dev/null and b/images/cloud9-graphana-preview.png differ diff --git a/images/eks-addon.png b/images/eks-addon.png new file mode 100644 index 0000000..537e769 Binary files /dev/null and b/images/eks-addon.png differ diff --git a/initialize-repo.sh b/initialize-repo.sh index 0911faf..5ebd6e4 100755 --- a/initialize-repo.sh +++ b/initialize-repo.sh @@ -149,7 +149,7 @@ fi if sh -c "echo $USE_DATAGEN | grep -q -E '^(yes)$'" ; then echo "[Setup] Populating the database with testing data..." make datagen@image IMAGE_PREFIX="${STACK_NAME}-" - make datagen@push IMAGE_PREFIX="${STACK_NAME}-" + # make datagen@push IMAGE_PREFIX="${STACK_NAME}-" if sh -c "echo $VARIANT | grep -q -E '^(Aerospike)$'" ; then echo "Datagen on Aerospike has been disabled" make aerospike@datagen DATAGEN_CONCURRENCY=32 DATAGEN_ITEMS_PER_JOB=10000 DATAGEN_DEVICES_ITEMS_PER_JOB=100000 DATAGEN_DEVICES_PARALLELISM=30 STACK_NAME=${STACK_NAME} @@ -165,7 +165,7 @@ make eks@deploybidder VALUES=${BIDDER_OVERLAY_TEMP} if sh -c "echo $USE_LOAD_GENERATOR | grep -q -E '^(yes)$'" ; then make load-generator@build - make load-generator@push + # make load-generator@push LOAD_GENERATOR_OVERLAY_TEMP=$(mktemp) envsubst < deployment/infrastructure/deployment/load-generator/overlay-codekit.yaml.tmpl >${LOAD_GENERATOR_OVERLAY_TEMP} diff --git a/playground.ipynb b/playground.ipynb new file mode 100644 index 0000000..2c626e6 --- /dev/null +++ b/playground.ipynb @@ -0,0 +1,180 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Experiments playground notebook\n", + "Use this notebook to run helper code and to test python cdk code excerpts" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%pip install boto3" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Change capacity mode for dynamo db\n", + "Use this to maange costs after the stack deployment. Provisioned capacity setting to support performance requirements for RTB is the major cost contributor in this stack." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# use python sdk to connect to a profile session\n", + "import boto3\n", + "profile_name = 'rtb'\n", + "root_stack_name = 'rtbkit-bkr-dev'\n", + "session = boto3.session.Session(profile_name=profile_name)\n", + "# create a dynamodb client\n", + "dynamodb = session.client('dynamodb')\n", + "# list all tables\n", + "try:\n", + " tables = dynamodb.list_tables()['TableNames']\n", + " # if table name starts with root_stack_name, check the capacity mode, if the capacity mode is provisioned change it to on-demand\n", + " for table in tables:\n", + " if table.startswith(root_stack_name):\n", + " response = dynamodb.describe_table(TableName=table)['Table']\n", + " print(response)\n", + " if 'BillingModeSummary' in response:\n", + " billing_mode = response['BillingModeSummary']['BillingMode']\n", + " if billing_mode == 'PROVISIONED':\n", + " print(\"Table\", table, \"is using provisioned capacity\")\n", + " try:\n", + " uresponse = dynamodb.update_table(TableName=table,BillingMode='PAY_PER_REQUEST')\n", + " print(f\"Table {table} updated successfully to on-demand mode.\")\n", + " except Exception as e:\n", + " print(f\"Error updating table: {str(e)}\")\n", + " elif billing_mode == 'PAY_PER_REQUEST':\n", + " print(\"Table\", table, \"is using on-demand capacity\")\n", + " else:\n", + " # If BillingModeSummary is not present, the table is using provisioned capacity\n", + " print(\"Table\", table, \"is using provisioned capacity\")\n", + " try:\n", + " uresponse = dynamodb.update_table(TableName=table,BillingMode='PAY_PER_REQUEST')\n", + " print(f\"Table {table} updated successfully to on-demand mode.\")\n", + " except Exception as e:\n", + " print(f\"Error updating table: {str(e)}\")\n", + "except Exception as e:\n", + " print(f\"Error describing table: {str(e)}\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Change kinesis shard count and capacity mode" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# list all kinesis streams whose name starts with a prefix\n", + "from time import sleep\n", + "kinesis_client = session.client('kinesis')\n", + "response = kinesis_client.list_streams()\n", + "# print(response)\n", + "stream_arns = [item['StreamARN'] for item in response['StreamSummaries'] if root_stack_name in item['StreamARN']]\n", + "print(stream_arns)\n", + "# check the capacity mode of each stream\n", + "for stream_arn in stream_arns:\n", + " response = kinesis_client.describe_stream_summary(StreamARN=stream_arn)\n", + " capacity_mode = response['StreamDescriptionSummary']['StreamModeDetails']['StreamMode']\n", + " if capacity_mode == 'PROVISIONED':\n", + " shards = response['StreamDescriptionSummary']['OpenShardCount']\n", + " print(f\"Stream: {stream_arn}, Capacity Mode: {capacity_mode}\", f\"Shards: {shards}\")\n", + " # first set shard to half of existing and then set shard count to 200\n", + " if shards >=200:\n", + " try:\n", + " kinesis_client.update_shard_count(StreamARN=stream_arn, TargetShardCount=200, ScalingType='UNIFORM_SCALING')\n", + " except kinesis_client.exceptions.InvalidArgumentException as e:\n", + " if \"UpdateShardCount cannot scale down below half your current open shard count\" in str(e):\n", + " print(f\"Error updating shard count for stream: {stream_arn}, error: {e}\")\n", + " half_shards = int(shards / 2)\n", + " kinesis_client.update_shard_count(StreamARN=stream_arn, TargetShardCount=half_shards, ScalingType='UNIFORM_SCALING')\n", + " while True:\n", + " response = kinesis_client.describe_stream_summary(StreamARN=stream_arn)\n", + " shard_count = response['StreamDescriptionSummary']['OpenShardCount']\n", + " if shard_count == half_shards:\n", + " print(f\"Updated shard count to {shard_count} for stream: {stream_arn}\")\n", + " break\n", + " print(f\"Waiting for shard count update for stream: {stream_arn}, current shard count: {shard_count}\")\n", + " sleep(10)\n", + " else:\n", + " # keep checking the shard count until it's updated\n", + " while True:\n", + " response = kinesis_client.describe_stream_summary(StreamARN=stream_arn)\n", + " shard_count = response['StreamDescriptionSummary']['OpenShardCount']\n", + " if shard_count == 200:\n", + " print(f\"Updated shard count to {shard_count} for stream: {stream_arn}\")\n", + " break\n", + " print(f\"Waiting for shard count update for stream: {stream_arn}, current shard count: {shard_count}\")\n", + " sleep(10)\n", + " # let the previous shard count update complete and the stream in \"ACTIVE\" status\n", + " sleep(10)\n", + " # change scaling mode to on demand\n", + " kinesis_client.update_stream_mode(\n", + " StreamARN=kinesis_client.describe_stream(StreamARN=stream_arn)['StreamDescription']['StreamARN'],\n", + " StreamModeDetails={'StreamMode': 'ON_DEMAND'}\n", + " )\n", + " else:\n", + " kinesis_client.update_stream_mode(\n", + " StreamARN=kinesis_client.describe_stream(StreamARN=stream_arn)['StreamDescription']['StreamARN'],\n", + " StreamModeDetails={'StreamMode': 'ON_DEMAND'}\n", + " )\n", + " # let the previous shard count update complete and the stream in \"ACTIVE\" status\n", + " sleep(10)\n", + " capacity_mode = response['StreamDescriptionSummary']['StreamModeDetails']['StreamMode']\n", + " if capacity_mode == 'ON_DEMAND':\n", + " print(f\"Stream: {stream_arn}, Updated Capacity Mode: {capacity_mode}\")\n", + " else:\n", + " print(f\"Stream: {stream_arn}, Capacity Mode: {capacity_mode}\")\n", + "\n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "\"\"" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": ".venv", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.12.5" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +} diff --git a/post-build.sh b/post-build.sh new file mode 100755 index 0000000..309ffbe --- /dev/null +++ b/post-build.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# take region and cluster name and cli profile as input variables +# take input parameters for the benchmark +if [ -z "$1" ] +then + echo "This script requires the aws region cloud formation root stack name of the RTB Kit solution" + echo "Usage: ${0} " + exit 1 +fi +if [ -z "$2" ] +then + echo "This script requires the aws region cloud formation root stack name of the RTB Kit solution" + echo "Usage: ${0} " + exit 1 +fi + +AWS_REGION=$1 +RTBKIT_ROOT_STACK_NAME=$2 +LoggingConfig='{"clusterLogging":[{"types":["api","audit","authenticator","controllerManager","scheduler"],"enabled":true}]}' +echo "Starting cluster config update." + +if [ -z "$3" ] +then + echo "WARNING:AWS CLI Profile not given" + output=`aws eks update-cluster-config --region $AWS_REGION --name $RTBKIT_ROOT_STACK_NAME --logging $LoggingConfig 2>&1` + +else + export PROFILE=$3 + output=`aws eks update-cluster-config --region $AWS_REGION --name $RTBKIT_ROOT_STACK_NAME --logging $LoggingConfig --profile $PROFILE 2>&1` +fi +# if output contains "No changes needed for the logging config provided", then the cluster config was already updated +# otherwise, there was an error +if [[ $output == *"No changes needed for the logging config provided"* ]]; then + echo "Cluster config already updated." + exit 0 +else + echo "Error encountered while updating the cluster logging config" + echo "ERROR:${output}" + exit 2 +fi +echo "Cluster config updated successfully." \ No newline at end of file diff --git a/run-benchmark.sh b/run-benchmark.sh new file mode 100755 index 0000000..2c7e18b --- /dev/null +++ b/run-benchmark.sh @@ -0,0 +1,91 @@ +#!/usr/bin/env bash +# This script follows the steps outlined in CDP to setup the cloud 9 instance to run bench marks and +# view results in graphana dashboard +# Login to cloud9 terminal, +# cd RTBCodeKitRepo +# chmod 700 run-benchmark.sh +# ./run-benchmark.sh + +set -ex +# take input parameters for the benchmark +if [ -z "$1" ] +then + echo "Benchmark tool requires the cloud formation root stack name of the RTB Kit solution and the CLI profile" + echo "Usage: ${0} [(100ms) (1) (200) (1000) (60s)]" + exit 1 +fi +if [ -z "$2" ] +then + echo "WARNING:AWS CLI Profile not given" + export PROFILE="rtb" + echo "Using default AWS CLI profile ${PROFILE}" +else + export PROFILE=$2 +fi +if [ -z "$3" ] +then + echo "Timeout argument not given" + export TIMEOUT=100ms + echo "Using default timeout of ${TIMEOUT}" +fi +if [ -z "$4" ] +then + echo "Number of jobs argument not given" + export NUMBER_OF_JOBS=1 + echo "Using default number of jobs of ${NUMBER_OF_JOBS}" +fi +if [ -z "$5" ] +then + echo "Rate per job argument not given" + export RATE_PER_JOB=200 + echo "Using default rate per job of ${RATE_PER_JOB}" +fi +if [ -z "$6" ] +then + echo "Number of devices argument not given" + export NUMBER_OF_DEVICES=10000 + echo "Using default number of devices of ${NUMBER_OF_DEVICES}" +fi +if [ -z "$7" ] +then + echo "Duration argument not given" + export DURATION=60s + echo "Using default duration of ${DURATION}" +fi + +# EKS Cluster connectivity +export AWS_ACCOUNT=$(aws sts get-caller-identity --query Account --output text --profile $PROFILE) +export AWS_REGION=$(aws configure get region --profile $PROFILE) +export ROOT_STACK=$1 +export APPLICATION_STACK_NAME=`aws cloudformation list-exports --query "Exports[?Name=='ApplicationStackName'].Value" --output text --profile ${PROFILE}` +export CODEBUILD_STACK_NAME=`aws cloudformation describe-stacks --stack-name ${ROOT_STACK} --output json --profile ${PROFILE} | jq '.Stacks[].Outputs[] | select(.OutputKey=="CodebuildStackARN") | .OutputValue' | cut -d/ -f2` +export EKS_WORKER_ROLE_ARN=`aws cloudformation list-exports --query "Exports[?Name=='EKSWorkerRoleARN'].Value" --output text --profile ${PROFILE}` +export EKS_ACCESS_ROLE_ARN=`aws cloudformation list-exports --query "Exports[?Name=='EKSAccessRoleARN'].Value" --output text --profile ${PROFILE}` +export STACK_NAME=$ROOT_STACK + +echo "Check the CLI profile configuration, account and region settings first if you hit errors" + +CREDS_JSON=`aws sts assume-role --role-arn $EKS_ACCESS_ROLE_ARN --role-session-name EKSRole-Session --output json --profile $PROFILE` +export AWS_ACCESS_KEY_ID=`echo $CREDS_JSON | jq '.Credentials.AccessKeyId' | tr -d '"'` +export AWS_SECRET_ACCESS_KEY=`echo $CREDS_JSON | jq '.Credentials.SecretAccessKey' | tr -d '"'` +export AWS_SESSION_TOKEN=`echo $CREDS_JSON | jq '.Credentials.SessionToken' | tr -d '"'` +CREDS_JSON="" +make eks@grant-access + +# connect to cluster +# make eks@use +kubectl get pods + +# run benchmark +make benchmark@cleanup +make benchmark@run TIMEOUT=$TIMEOUT NUMBER_OF_JOBS=$NUMBER_OF_JOBS RATE_PER_JOB=$RATE_PER_JOB NUMBER_OF_DEVICES=$NUMBER_OF_DEVICES DURATION=$DURATION +# TIMEOUT=100ms # Request timeout (default 100ms) +# DURATION=500s # duration of the load generation +# RATE_PER_JOB=5000 # target request rate for the load generator +# NUMBER_OF_DEVICES=10 # number of device IFAs to use in bid request +# NUMBER_OF_JOBS=1 # number of parallel instances of the load generator +# SLOPE=0 # slope of requests per second increase (zero for a constant rate; see ) +# ENABLE_PROFILER=1 # used to start profiling session, leave unset to disable + +# open graphana +kubectl port-forward svc/prom-grafana 8080:80 diff --git a/run-golangci-lint.sh b/run-golangci-lint.sh old mode 100644 new mode 100755 diff --git a/tools/datagen/Makefile b/tools/datagen/Makefile index e1ddaea..9f80a61 100644 --- a/tools/datagen/Makefile +++ b/tools/datagen/Makefile @@ -29,11 +29,13 @@ clean: .PHONY: image image: CONTEXT_DIR ?= $(_PWD) image: - echo $(CONTEXT_DIR) && \ - docker build --no-cache -t $(DATAGEN_IMAGE_TAG) -f $(CONTEXT_DIR)/Dockerfile --build-arg IMAGE_PREFIX=$(AWS_PUBLIC_IMAGE_PREFIX) --build-arg REGISTRY=$(AWS_PUBLIC_ECR_REGISTRY) $(CONTEXT_DIR) +# Adding push to the command to fix pipeline errors + echo $(CONTEXT_DIR) && echo $(DATAGEN_IMAGE_TAG) && \ + docker build --push --no-cache -t $(DATAGEN_IMAGE_TAG) -f $(CONTEXT_DIR)/Dockerfile --build-arg IMAGE_PREFIX=$(AWS_PUBLIC_IMAGE_PREFIX) --build-arg REGISTRY=$(AWS_PUBLIC_ECR_REGISTRY) $(CONTEXT_DIR) .PHONY: push +push: CONTEXT_DIR ?= $(_PWD) push: - docker push $(DATAGEN_IMAGE_TAG) + echo $(CONTEXT_DIR) && docker image ls && docker push $(DATAGEN_IMAGE_TAG) datagen@tag-latest: docker tag $(AWS_ECR_REGISTRY)/$(APP):$(DATAGEN_IMAGE_VERSION) $(AWS_ECR_REGISTRY)/$(APP):latest @@ -92,7 +94,8 @@ datagen@image: ## Builds docker image with datagen tool $(MAKE) -C $(_APP_DIR) image datagen@push: ## Pushes docker image with datagen tool -datagen@push: push +datagen@push: + $(MAKE) -C $(_APP_DIR) push datagen@ci: ## Run linters and tests for the datagen tool $(MAKE) -C $(_APP_DIR) lint.docker test.docker diff --git a/tools/load-generator/Makefile b/tools/load-generator/Makefile index 46b358b..9a25645 100644 --- a/tools/load-generator/Makefile +++ b/tools/load-generator/Makefile @@ -34,8 +34,8 @@ load-generator@test: ## Run unit tests # Targets run from repository root ################################################################################ -load-generator@build: ## Builds docker image with load-generator tool - docker build -t $(LOAD_GENERATOR_IMAGE_TAG) --build-arg IMAGE_PREFIX=$(AWS_PUBLIC_IMAGE_PREFIX) --build-arg REGISTRY=$(AWS_PUBLIC_ECR_REGISTRY) $(_PWD)/tools/load-generator +load-generator@build: ## Builds docker image with load-generator tool, Adding push to the command to fix pipeline errors + docker build --push -t $(LOAD_GENERATOR_IMAGE_TAG) --build-arg IMAGE_PREFIX=$(AWS_PUBLIC_IMAGE_PREFIX) --build-arg REGISTRY=$(AWS_PUBLIC_ECR_REGISTRY) $(_PWD)/tools/load-generator load-generator@push: ## Pushes docker image with load-generator tool docker push $(LOAD_GENERATOR_IMAGE_TAG) diff --git a/tools/nvme-provisioner/Dockerfile b/tools/nvme-provisioner/Dockerfile index 67dbe61..4e2872f 100644 --- a/tools/nvme-provisioner/Dockerfile +++ b/tools/nvme-provisioner/Dockerfile @@ -1,4 +1,5 @@ -FROM debian:stretch-slim +# Fix for issue 72 +FROM debian:bookworm-slim RUN apt-get update && apt-get -y install nvme-cli mdadm && apt-get -y clean && apt-get -y autoremove COPY nvme-provisioner.sh /usr/local/bin/ diff --git a/update-node-group-size.sh b/update-node-group-size.sh new file mode 100755 index 0000000..5acf39a --- /dev/null +++ b/update-node-group-size.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +set -e + +# take the desired node size as input +if [ -z "$1" ] +then + echo "This script sets node size of all the node groups in the Script requires the cloud formation root stack name of the RTB Kit solution" + echo "Usage: ${0} " + exit 1 +fi +if [ -z "$2" ] +then + echo "Script requires the desired size of node group" + echo "Usage: ${0} " + exit 1 +fi +clustername=$1 +size=$2 +nodegroups=`aws --profile rtb eks list-nodegroups --cluster-name $clustername | jq '.nodegroups[]' | tr -d "\""` + +while IFS= read -r line; do + echo $line + # if you want to change the min size as well + # aws eks update-nodegroup-config \ + # --cluster-name $clustername \ + # --nodegroup-name $line \ + # --scaling-config minSize=$size + aws --profile rtb eks update-nodegroup-config \ + --cluster-name $clustername \ + --nodegroup-name $line \ + --scaling-config desiredSize=$size +done <<< "$nodegroups"