-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
66709d8
commit e335863
Showing
3 changed files
with
63 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
version: '3.7' | ||
|
||
volumes: | ||
scrape-intervals-pmm-server-data: | ||
|
||
networks: | ||
scrape-intervals: | ||
|
||
services: | ||
pmm-server-scrape-intervals: | ||
image: ${DOCKER_VERSION:-perconalab/pmm-server:dev-latest} | ||
container_name: pmm-server-scrape-intervals | ||
healthcheck: | ||
test: [ "CMD", "curl", "-f", "http://127.0.0.1/ping" ] | ||
interval: 3s | ||
timeout: 2s | ||
retries: 20 | ||
ports: | ||
- "180:80" | ||
- "1443:443" | ||
environment: | ||
- PMM_DEBUG=1 | ||
volumes: | ||
- scrape-intervals-pmm-server-data:/srv | ||
networks: | ||
- scrape-intervals | ||
|
||
pmm-client-scrape-intervals: | ||
image: ${CLIENT_DOCKER_VERSION:-perconalab/pmm-client:dev-latest} | ||
container_name: pmm-client-scrape-intervals | ||
depends_on: | ||
pmm-server-scrape-intervals: | ||
condition: service_healthy | ||
environment: | ||
- PMM_AGENT_SETUP=1 | ||
- PMM_AGENT_SERVER_ADDRESS=pmm-server-scrape-intervals | ||
- PMM_AGENT_SERVER_USERNAME=admin | ||
- PMM_AGENT_SERVER_PASSWORD=admin | ||
- PMM_AGENT_PORTS_MIN=41000 | ||
- PMM_AGENT_PORTS_MAX=41500 | ||
- PMM_AGENT_SERVER_INSECURE_TLS=1 | ||
- PMM_AGENT_CONFIG_FILE=config/pmm-agent.yaml | ||
- PMM_AGENT_SETUP_NODE_NAME=pmm-client-scrape-intervals | ||
- PMM_AGENT_SETUP_FORCE=1 | ||
- PMM_AGENT_SETUP_NODE_TYPE=container | ||
restart: on-failure | ||
networks: | ||
- scrape-intervals |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { test, expect } from '@playwright/test'; | ||
import { test } from '@playwright/test'; | ||
import * as cli from '@helpers/cliHelper'; | ||
|
||
/** | ||
|
@@ -10,3 +10,16 @@ test('run pmm-status and grep NodeName', async ({}) => { | |
await output.outContains('Node name: client_container_'); | ||
}); | ||
|
||
test('scrape interval default value', async ({page}) => { | ||
const expectedScrapeSize = '64'; | ||
|
||
await (await cli.exec(`docker-compose -f cli/test-setup/docker-compose-scrape-intervals.yml up -d`)).assertSuccess(); | ||
await (await cli.exec('sudo pmm-admin config --force \'--server-url=https://admin:[email protected]:1443\' --server-insecure-tls 127.0.0.1')).assertSuccess() | ||
|
||
const scrapeSizeContainer = await cli.exec('docker logs pmm-client-scrape-intervals 2>&1 | grep \'promscrape.maxScrapeSize.*vm_agent\' | tail -1'); | ||
await scrapeSizeContainer.outContains(`promscrape.maxScrapeSize=\\\"${expectedScrapeSize}MiB\\\"`) | ||
|
||
const scrapeSizeTarball = await cli.exec('ps aux | grep -v \'grep\' | grep \'vm_agent\' | tail -1 | grep -o \'promscrape.maxScrapeSize.*vm_agent\' | tail -1') | ||
await scrapeSizeTarball.outContains(`promscrape.maxScrapeSize=\\\"${expectedScrapeSize}MiB\\\"`) | ||
}); | ||
|