How to monitor a specific process using metricbeats? - elasticsearch

I have the following basic metricbeats config
metricbeat.modules:
- module: system
metricsets:
- cpu
- filesystem
- memory
- network
- process
enabled: true
period: 10s
processes: ['.*']
cpu_ticks: false
Now I want to monitor only a specific process with process id (pid) = 27056.
I know that I have to do some modifications under the "processes" field of the above config file. Can any please help on how to proceed further?

You can monitor the processes which match any of a list of expressions you pass. For example, this reports on all processes running with nginx, java or python in the command line.
processes: ['nginx','java', 'python']

Related

Unknown processors type "resourcedetection" for "resourcedetection"

Running OT Collector with image ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector:0.58.0
In config.yaml I have,
processors:
batch:
resourcedetection:
detectors: [ env ]
timeout: 2s
override: false
The collector is deployed as a sidecar but it keeps failing with
collector server run finished with error: failed to get config: cannot unmarshal the configuration: unknown processors type "resourcedetection" for "resourcedetection" (valid values: [resource span probabilistic_sampler filter batch memory_limiter attributes])
Any idea as to what is causing this? I haven't found any relevant documentation/question
The Resource Detection Processor is part of the otelcol-contrib distro upstream and you'd hence would need to use otel/opentelemetry-collector-contrib:0.58.0 (or the equivalent on your container registry of choice) for this processor to be available in your collector.

How can I create several executors for a job in Circle CI orb?

NOTE: The actual problem I am trying to solve is run testcontainers in Circle CI.
To make it reusable, I decided to extend the existing orb in my organisation.
The question, how can I create several executors for a job? I was able to create the executor itself.
Executor ubuntu.yml:
description: >
The executor to run testcontainers without extra setup in Circle CI builds.
parameters:
# https://circleci.com/docs/2.0/configuration-reference/#resource_class
resource-class:
type: enum
default: medium
enum: [medium, large, xlarge, 2xlarge]
tag:
type: string
default: ubuntu-2004:202010-01
resource_class: <<parameters.resource-class>>
machine:
image: <<parameters.tag>>
One of the jobs itself:
parameters:
executor:
type: executor
default: openjdk
resource-class:
type: enum
default: medium
enum: [small, medium, medium+, large, xlarge]
executor: << parameters.executor >>
resource_class: << parameters.resource-class >>
environment:
# Customize the JVM maximum heap limit
MAVEN_OPTS: -Xmx3200m
steps:
# Instead of checking out code, just grab it the way it is
- attach_workspace:
at: .
# Guessing this is still necessary (we only attach the project folder)
- configure-maven-settings
- cloudwheel/fetch-and-update-maven-cache
- run:
name: "Deploy to Nexus without running tests"
command: mvn clean deploy -DskipTests
I couldn't find a good example of adding several executors, and I assume that I will need to add ubuntu and openjdk for every job. Am I right?
I continue looking into other orbs and documentation but cannot find a similar case to mine.
As it is stated in Circle CI documentation, executors can be defined like this:
executors:
my-executor:
machine: true
my-openjdk:
docker:
- image: openjdk:11
Side note, there can be many executors of any type such as docker, machine (Linux), macos, win.
See, StackOverflow question how to invoke executors from CircleCI orbs.

Taurus YAML Runtime Property Change for JMeter

I am trying to invoke Jmeter script with user defined properties with YAML which I am able to change and execute with below configuration.
However if the test started and I need to increase the user on any thread - without stopping the test, how can I achieve that? Let's say the test was started with Thread1 value as 30 and now if I need to change it to 50 dynamically on runtime. I did not find a way myself. Please advise.
execution:
- #concurrency: ${__P(my_conc,3)} # use `my_conc` prop or default=3 if property isn't found
ramp-up: 1
hold-for: ${__P(my_hold,1)}
scenario: simple
modules:
jmeter:
properties:
my_hold: 60
scenarios:
simple:
variables:
#User DEFINED variable
Sampler1 : TestSampler1
Sampler2 : TestSampler2
script: SampleYAMLJMeter.jmx
properties:
#Thread Level variable
thread1 : 30
thread2 : 45
Add the following global JMeter properties:
modules:
jmeter:
properties:
beanshell.server.port: 9000
beanshell.server.file: ../extras/startup.bsh
Create the setconc.bsh file under .bzt/jmeter-taurus/x.x.x/lib folder and put the following code into it:
org.apache.jmeter.util.JMeterUtils.setProperty("my_conc", args[0]);
That's it, whenever you need to change the concurrency of your tests just execute the following command from the .bzt/jmeter-taurus/x.x.x/lib folder:
java -jar bshclient.jar localhost 9000 setconc.bsh 1234
replace 1234 with the actual concurrency you want to achieve
More information:
Beanshell server
How to Change JMeter´s Load During Runtime

Parallel and distributed execution of multiple scenarios in taurus

I have following requirements to execute the performance test via Taurus.
Requirements:
1. A single jmx on multiple(distributed) jmeters
2. For every Jmeter an unique IP address to be passed at run time
3. For every Jmeter a set of unique .csv path has to be provided in .yml(as data source)
4. All Jmeters should run in parallel and report should be combined of all.
Tried with following, but unable to achieve. Let me know or share the sample .yml if any one done such kind of scenario.
execution:
- scenario:
# scenario1:
script: varTest.jmx
distributed:
- localhost:1099
variables:
host: "10"
- scenario:
# scenario2:
script: varTest.jmx
distributed:
- localhost:2010
variables:
host: "20"
In this,need to override hosts dynamically with option -o.
It doesn't contain csv datasource details, pls share the how to create a .yml for such requirement.
Thanks..
You could try something like:
---
execution:
- distributed:
- localhost:1099
scenario:
script: varTest.jmx
distributed:
variables:
host: "10"
- distributed:
- localhost:2010
scenario:
script: varTest.jmx
variables:
host: "20"
References:
Run JMeter in Distributed Mode
Running Taurus in Command Line
Taurus - Working with Multiple JMeter Tests

Parsing concurrency '${addressThread}' in group 'ThreadGroup' failed, choose 1

I am trying to define a percentage of threads for each ThreadGroup in my load testing .jmx file, and pass the total number of threads from taurus config .yaml file.
However, taurus fails to parse the expression, even though when I try to debug it using jmeter I can see that the expressions works. ( I am setting the total number of users in user.property file in jmeter).
This is my yaml config file.
---
scenarios:
student_service:
script: ~/jmeter/TestPlan.jmx
variables:
addressThread: 100
think-time: 500ms
execution:
- scenario: student_service
hold-for: 5m
versions I am using:
Taurus CLI Tool
MacOs10.13.6
Jmeter 5.0
You're mixing properties and variables.
It should be:
---
scenarios:
student_service:
script: ~/jmeter/TestPlan.jmx
properties:
addressThread: 100
think-time: 500ms
execution:
- scenario: student_service
hold-for: 5m
And in JMeter, you should be using __P function:
${__P(addressThread)}
Still, there is a bug in current version of Taurus 1.13.2, so you need to wait for next version:
https://groups.google.com/d/msg/codename-taurus/QggRz9QDnO0/_FEGllDoGAAJ

Resources