<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Middleware Team, auteur/autrice sur dbi Blog</title>
	<atom:link href="https://www.dbi-services.com/blog/author/middleware-team/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbi-services.com/blog/author/middleware-team/</link>
	<description></description>
	<lastBuildDate>Tue, 10 Sep 2024 15:55:26 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2025/05/cropped-favicon_512x512px-min-32x32.png</url>
	<title>Middleware Team, auteur/autrice sur dbi Blog</title>
	<link>https://www.dbi-services.com/blog/author/middleware-team/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Apache Kafka and ksqlDB</title>
		<link>https://www.dbi-services.com/blog/apache-kafka-and-ksqldb/</link>
					<comments>https://www.dbi-services.com/blog/apache-kafka-and-ksqldb/#respond</comments>
		
		<dc:creator><![CDATA[Middleware Team]]></dc:creator>
		<pubDate>Fri, 19 Apr 2024 12:52:21 +0000</pubDate>
				<category><![CDATA[Application integration & Middleware]]></category>
		<category><![CDATA[Apache Kafka]]></category>
		<category><![CDATA[ETL]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/?p=32707</guid>

					<description><![CDATA[<p>After two introduction blogs on Apache Kafka (ie. Apache Kafka Concepts by Example and Apache Kafka Consumer Group), it is time to discover the wide ecosystem around it. In this blog post, I will play with ksqlDB, streams and tables. ksqlDB ksqlDB is a server that takes benefit of an Apache Kafka infrastructure for real [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/apache-kafka-and-ksqldb/">Apache Kafka and ksqlDB</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>After two introduction blogs on Apache Kafka (ie. <a href="https://www.dbi-services.com/blog/apache-kafka-concepts-by-example/" target="_blank" rel="noreferrer noopener">Apache Kafka Concepts by Example</a> and <a href="https://www.dbi-services.com/blog/apache-kafka-consumer-group/" target="_blank" rel="noreferrer noopener">Apache Kafka Consumer Group</a>), it is time to discover the wide ecosystem around it. In this blog post, I will play with <a href="https://ksqldb.io/overview.html" target="_blank" rel="noreferrer noopener">ksqlDB</a>, streams and tables.</p>



<h2 class="wp-block-heading" id="h-ksqldb">ksqlDB</h2>



<p>ksqlDB is a server that takes benefit of an Apache Kafka infrastructure for real time data streaming. It can be used to capture events (via, for example, Kafka Connect), transform events, expose views (or tables).</p>



<p>Starting ksqlDB server is easy. First, we need to set the bootstrap servers of our Kafka cluster in <code>etc/ksqldb/ksql-server.properties</code> file:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
bootstrap.servers=localhost:29092
</pre></div>


<p>As it is used for a proof of concept, I use a one broker cluster (ie. without high availability). Of course, ksqlDB server supports HA.</p>



<p>The command to start:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
bin/ksql-server-start etc/ksqldb/ksql-server.properties
</pre></div>


<p>And once, it up and running, you should see this:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
&#x5B;2024-04-19 11:43:25,485] INFO Waiting until monitored service is ready for metrics collection (io.confluent.support.metrics.BaseMetricsReporter:173)
&#x5B;2024-04-19 11:43:25,485] INFO Monitored service is now ready (io.confluent.support.metrics.BaseMetricsReporter:185)
&#x5B;2024-04-19 11:43:25,485] INFO Attempting to collect and submit metrics (io.confluent.support.metrics.BaseMetricsReporter:144)
&#x5B;2024-04-19 11:43:25,486] INFO ksqlDB API server listening on http://0.0.0.0:8088 (io.confluent.ksql.rest.server.KsqlRestApplication:385)

                  ===========================================
                  =       _              _ ____  ____       =
                  =      | | _____  __ _| |  _ \| __ )      =
                  =      | |/ / __|/ _` | | | | |  _ \      =
                  =      |   &amp;lt;\__ \ (_| | | |_| | |_) |     =
                  =      |_|\_\___/\__, |_|____/|____/      =
                  =                   |_|                   =
                  =        The Database purpose-built       =
                  =        for stream processing apps       =
                  ===========================================

Copyright 2017-2022 Confluent Inc.

Server 0.29.0 listening on http://0.0.0.0:8088

To access the KSQL CLI, run:
ksql http://0.0.0.0:8088

&#x5B;2024-04-19 11:43:25,489] INFO Server up and running (io.confluent.ksql.rest.server.KsqlServerMain:153)
&#x5B;2024-04-19 11:47:04,248] INFO Successfully submitted metrics to Confluent via secure endpoint (io.confluent.support.metrics.submitters.ConfluentSubmitter:146)
</pre></div>


<h2 class="wp-block-heading" id="h-ksqldb-client">ksqlDB Client</h2>



<p>Now, we are ready to start the ksqlDB client:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
bin/ksql http://localhost:8088
</pre></div>


<p>if all went well, you should receive the ksql prompt and see the server status as <mark class="has-inline-color has-luminous-vivid-orange-color">RUNNING</mark>:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
                  ===========================================
                  =       _              _ ____  ____       =
                  =      | | _____  __ _| |  _ \| __ )      =
                  =      | |/ / __|/ _` | | | | |  _ \      =
                  =      |   &amp;lt;\__ \ (_| | | |_| | |_) |     =
                  =      |_|\_\___/\__, |_|____/|____/      =
                  =                   |_|                   =
                  =        The Database purpose-built       =
                  =        for stream processing apps       =
                  ===========================================

Copyright 2017-2022 Confluent Inc.

CLI v0.29.0, Server v0.29.0 located at http://localhost:8088
Server Status: RUNNING

Having trouble? Type &#039;help&#039; (case-insensitive) for a rundown of how things work!

ksql&amp;gt;
</pre></div>


<h2 class="wp-block-heading" id="h-stream">Stream</h2>



<p>One advantage, and a drawback as well, is that a Kafka topic (refer to my previous <a href="https://www.dbi-services.com/blog/apache-kafka-concepts-by-example/" target="_blank" rel="noreferrer noopener">blog post</a> if you don&#8217;t know what this is) can store anything and each message can have its own format (text or binary). <a href="https://docs.confluent.io/platform/current/schema-registry/index.html" target="_blank" rel="noreferrer noopener">Schema Registry</a> can enforce formatting rules, versioning and serialization/de-serialization information (I will cover that in another blog). ksql also enforces the formatting when defining a stream. For example, I create a order stream with 4 fields:</p>



<ul class="wp-block-list">
<li>order id</li>



<li>customer id</li>



<li>product id</li>



<li>status</li>
</ul>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: sql; title: ; notranslate">
ksql&gt; create stream order_stream (order_id int, customer_id int, product_id int, status_id int)
with (kafka_topic=&#039;order_topic&#039;,value_format=&#039;json&#039;,partitions=1);

 Message
----------------
 Stream created
----------------
</pre></div>


<p>To check what happened in the background, I could either use <a href="https://github.com/provectus/kafka-ui" target="_blank" rel="noreferrer noopener">Kafka UI</a> or even ksql:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: sql; title: ; notranslate">
ksql&gt; show streams;

 Stream Name         | Kafka Topic                 | Key Format | Value Format | Windowed
------------------------------------------------------------------------------------------
 KSQL_PROCESSING_LOG | default_ksql_processing_log | KAFKA      | JSON         | false
 ORDER_STREAM        | order_topic                 | KAFKA      | JSON         | false
------------------------------------------------------------------------------------------
ksql&gt; show topics;

 Kafka Topic                 | Partitions | Partition Replicas
---------------------------------------------------------------
 default_ksql_processing_log | 1          | 1
 order_topic                 | 1          | 1
---------------------------------------------------------------
ksql&gt;
</pre></div>


<p>We can see our stream and the associated backend topic.</p>



<p>Let&#8217;s insert data in the stream:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: sql; title: ; notranslate">
insert into order_stream (order_id, customer_id, product_id, status_id) values (1, 10, 21, 0);
</pre></div>


<p>And check data is there:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: sql; title: ; notranslate">
ksql&gt; select * from order_stream;
+-----------------------+-----------------------+-----------------------+-----------------------+
|ORDER_ID               |CUSTOMER_ID            |PRODUCT_ID             |STATUS_ID              |
+-----------------------+-----------------------+-----------------------+-----------------------+
|1                      |10                     |21                     |0                      |
Query Completed
Query terminated
</pre></div>


<p>And in the topic, what is actually stored? We can run a <code>kafka-console-consumer.sh</code> to see it. By the way, command must be started <strong>before</strong> inserting data or with <code>--from-beginning</code> option:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
$ ./kafka-console-consumer.sh --bootstrap-server localhost:29092 --topic order_topic
{&quot;ORDER_ID&quot;:1,&quot;CUSTOMER_ID&quot;:10,&quot;PRODUCT_ID&quot;:21,&quot;STATUS_ID&quot;:0}
</pre></div>


<p>Every update of the order status will imply a new event in the order_stream.</p>



<h2 class="wp-block-heading" id="h-table">Table</h2>



<p>Let&#8217;s say we want to see the status name instead of the status id which has no meaning to us. It is possible to create a table which will contain both status_id and the associated status_name:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: sql; title: ; notranslate">
create table status (status_id int primary key, status_name varchar)
with (kafka_topic=&#039;status&#039;,value_format=&#039;json&#039;,partitions=1);
</pre></div>


<p>As you can see, when defining a table, we have to define a primary key. One of the main difference is when querying a table, only the last value of each primary key will be provided.</p>



<p>Let&#8217;s insert some data into <mark class="has-inline-color has-luminous-vivid-orange-color">status </mark>table:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: sql; title: ; notranslate">
insert into status (status_id, status_name) values (0,&#039;Pending&#039;);
insert into status (status_id, status_name) values (1,&#039;Processing&#039;);
insert into status (status_id, status_name) values (2,&#039;Shipped&#039;);
insert into status (status_id, status_name) values (3,&#039;Delivered&#039;);
insert into status (status_id, status_name) values (4,&#039;Canceled&#039;);
</pre></div>


<p>And we can query it:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
ksql&amp;gt; select * from status emit changes;
+-------------------------------------------------+-------------------------------------------------+
|STATUS_ID                                        |STATUS_NAME                                      |
+-------------------------------------------------+-------------------------------------------------+
|0                                                |Pending                                          |
|1                                                |Processing                                       |
|2                                                |Shipped                                          |
|3                                                |Delivered                                        |
|4                                                |Canceled                                         |
</pre></div>


<p>Oops, I see a typo in Canceled. How to correct it? By inserting a new record with the update:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: sql; title: ; notranslate">
insert into status (status_id, status_name) values (4,&#039;Cancelled&#039;);
</pre></div>


<p>If I keep the select open, I will see the update and if I query it again, I see the fixed status_name:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: sql; title: ; notranslate">
ksql&gt; select * from status emit changes;
+-------------------------------------------------+-------------------------------------------------+
|STATUS_ID                                        |STATUS_NAME                                      |
+-------------------------------------------------+-------------------------------------------------+
|0                                                |Pending                                          |
|1                                                |Processing                                       |
|2                                                |Shipped                                          |
|3                                                |Delivered                                        |
|4                                                |Cancelled                                        |
</pre></div>


<h2 class="wp-block-heading" id="h-joining-table-and-stream">Joining Table and Stream</h2>



<p>One interest of this is that you can join table and stream like in any SQL database to improve the result. The SQL query to create that stream is:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: sql; title: ; notranslate">
create stream order_stream_with_status as
  select order_id, customer_id, order_stream.status_id, product_id, status.status_name as status_name
  from order_stream left join status on order_stream.status_id = status.status_id
emit changes;
</pre></div>


<p>Here I create a new stream (ie. order_stream_with_status) based on an stream <mark class="has-inline-color has-luminous-vivid-orange-color">order_stream </mark>and joined to table <mark class="has-inline-color has-pale-cyan-blue-color">status_name</mark>. &#8220;<code>emit changes</code>&#8221; is to see all changes (messages) from the topic.</p>



<p>Let&#8217;s see what is happening while selecting from this new stream when inserting in order_stream:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: sql; title: ; notranslate">
 select * from ORDER_STREAM_WITH_STATUS emit changes;
+------------------+------------------+------------------+------------------+------------------+
|ORDER_STREAM_STATU|ORDER_ID          |CUSTOMER_ID       |PRODUCT_ID        |STATUS_NAME       |
|S_ID              |                  |                  |                  |                  |
+------------------+------------------+------------------+------------------+------------------+
|0                 |1                 |10                |21                |Pending           |
</pre></div>


<p>Great! Now, we see a status name. Of course, this can be done with other columns as well. We can even use Kafka Connect to get data from a database like MySQL or Postgres.</p>



<h2 class="wp-block-heading" id="h-filtered-stream">Filtered Stream</h2>



<p>Now, let&#8217;s say our shop bills customer when order has been shipped. Obviously, they don&#8217;t want to be notified on all events received in <mark class="has-inline-color has-luminous-vivid-orange-color">order_stream</mark>, thus we can create a new stream which will filter on status_id=2. The sql query for that can be:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: sql; title: ; notranslate">
create stream order_stream_billing as
 select order_id, customer_id, order_stream.status_id, product_id, status.status_name as status_name
 from order_stream left join status on order_stream.status_id = status.status_id
 where order_stream.status_id=2
emit changes;
</pre></div>


<p>We can insert few orders into order_stream:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: sql; title: ; notranslate">
insert into order_stream (order_id, customer_id, product_id, status_id) values (1, 10, 21, 0);
insert into order_stream (order_id, customer_id, product_id, status_id) values (2, 10, 21, 0);
insert into order_stream (order_id, customer_id, product_id, status_id) values (3, 10, 21, 0);
insert into order_stream (order_id, customer_id, product_id, status_id) values (4, 10, 21, 0);
insert into order_stream (order_id, customer_id, product_id, status_id) values (5, 10, 21, 0);
</pre></div>


<p>And then update their status:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: sql; title: ; notranslate">
insert into order_stream (order_id, customer_id, product_id, status_id) values (1, 10, 21, 1);
insert into order_stream (order_id, customer_id, product_id, status_id) values (2, 10, 21, 1);
insert into order_stream (order_id, customer_id, product_id, status_id) values (3, 10, 21, 2);
insert into order_stream (order_id, customer_id, product_id, status_id) values (4, 10, 21, 1);
insert into order_stream (order_id, customer_id, product_id, status_id) values (5, 10, 21, 2);
</pre></div>


<p>What will the select show? You guessed right, only two of them will be in the queue:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: sql; title: ; notranslate">
select * from ORDER_STREAM_billing emit changes;
+------------------+------------------+------------------+------------------+------------------+
|ORDER_STREAM_STATU|ORDER_ID          |CUSTOMER_ID       |PRODUCT_ID        |STATUS_NAME       |
|S_ID              |                  |                  |                  |                  |
+------------------+------------------+------------------+------------------+------------------+
|2                 |3                 |10                |21                |Shipped           |
|2                 |5                 |10                |21                |Shipped           |

</pre></div>


<h2 class="wp-block-heading" id="h-and-in-the-infrastructure">And in the Infrastructure?</h2>



<p>While doing all these tests, I forgot to check what was happening on the pure Kafka side. Let&#8217;s see:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: sql; title: ; notranslate">
ksql&gt; show topics;

 Kafka Topic                 | Partitions | Partition Replicas
---------------------------------------------------------------
 ORDER_STREAM_BILLING        | 1          | 1
 ORDER_STREAM_WITH_STATUS    | 1          | 1
 default_ksql_processing_log | 1          | 1
 order_topic                 | 1          | 1
 status                      | 1          | 1
---------------------------------------------------------------
</pre></div>


<p>The two streams with upper case were created like that because topic name was not specified during the creation and, as per documentation, the upper case of table name is used as topic name.</p>



<p>In short, ksqlDB is part of an Extract, Transform and Load (ETL) process.</p>
<p>L’article <a href="https://www.dbi-services.com/blog/apache-kafka-and-ksqldb/">Apache Kafka and ksqlDB</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/apache-kafka-and-ksqldb/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Elasticsearch, Ingest Pipeline and Machine Learning</title>
		<link>https://www.dbi-services.com/blog/elasticsearch-ingest-pipeline-and-machine-learning/</link>
					<comments>https://www.dbi-services.com/blog/elasticsearch-ingest-pipeline-and-machine-learning/#respond</comments>
		
		<dc:creator><![CDATA[Middleware Team]]></dc:creator>
		<pubDate>Tue, 16 Apr 2024 10:23:46 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[ai]]></category>
		<category><![CDATA[Elasticsearch]]></category>
		<category><![CDATA[ETL]]></category>
		<category><![CDATA[Ingest]]></category>
		<category><![CDATA[machinelearning]]></category>
		<category><![CDATA[ML]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/?p=32580</guid>

					<description><![CDATA[<p>Elasticsearch has few interesting features around Machine Learning. While I was looking for data to import into Elasticsearch, I found interesting data sets from Airbnb especially reviews. I noticed that it does not contain any rate, but only comments. To have sentiment of the a review, I would rather have an opinion on that review [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/elasticsearch-ingest-pipeline-and-machine-learning/">Elasticsearch, Ingest Pipeline and Machine Learning</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Elasticsearch has few interesting features around Machine Learning. While I was looking for data to import into Elasticsearch, I found interesting data sets from <a href="https://insideairbnb.com/get-the-data/" target="_blank" rel="noreferrer noopener">Airbnb</a> especially reviews. I noticed that it does not contain any rate, but only comments.</p>



<p>To have <a href="https://en.wikipedia.org/wiki/Sentiment_analysis" target="_blank" rel="noreferrer noopener">sentiment</a> of the a review, I would rather have an opinion on that review like:</p>



<ul class="wp-block-list">
<li>Negative</li>



<li>Positive</li>



<li>Neutral</li>
</ul>



<p>For that matter, I found the <a href="https://huggingface.co/cardiffnlp/twitter-roberta-base-sentiment-latest" target="_blank" rel="noreferrer noopener">cardiffnlp/twitter-roberta-base-sentiment-latest</a> to suite my needs for my tests.</p>



<h2 class="wp-block-heading" id="h-import-model">Import Model</h2>



<p>Elasticsearch provides the tool to import models from <a href="https://huggingface.co/" target="_blank" rel="noreferrer noopener">Hugging face</a> into Elasticsearch itself: <a href="https://github.com/elastic/eland" target="_blank" rel="noreferrer noopener">eland</a>.</p>



<p>It is possible to install it or even use the pre-built docker image:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
docker run -it --rm --network host docker.elastic.co/eland/eland
</pre></div>


<p>Let&#8217;s import the model:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
eland_import_hub_model -u elastic -p &#039;password!&#039; --hub-model-id cardiffnlp/twitter-roberta-base-sentiment-latest --task-type classification --url https://127.0.0.1:9200
</pre></div>


<p>After a minute, import completes:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
2024-04-16 08:12:46,825 INFO : Model successfully imported with id &#039;cardiffnlp__twitter-roberta-base-sentiment-latest&#039;
</pre></div>


<p>I can also check that it was imported successfully with the following API call:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
GET _ml/trained_models/cardiffnlp__twitter-roberta-base-sentiment-latest
</pre></div>


<p>And result (extract):</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: jscript; title: ; notranslate">
{
  &quot;count&quot;: 1,
  &quot;trained_model_configs&quot;: &#x5B;
    {
      &quot;model_id&quot;: &quot;cardiffnlp__twitter-roberta-base-sentiment-latest&quot;,
      &quot;model_type&quot;: &quot;pytorch&quot;,
      &quot;created_by&quot;: &quot;api_user&quot;,
      &quot;version&quot;: &quot;12.0.0&quot;,
      &quot;create_time&quot;: 1713255117150,
...
      &quot;description&quot;: &quot;Model cardiffnlp/twitter-roberta-base-sentiment-latest for task type &#039;text_classification&#039;&quot;,
      &quot;tags&quot;: &#x5B;],
...
          },
          &quot;classification_labels&quot;: &#x5B;
            &quot;negative&quot;,
            &quot;neutral&quot;,
            &quot;positive&quot;
          ],
...
  ]
}
</pre></div>


<p>Next, model must be started:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
POST _ml/trained_models/cardiffnlp__twitter-roberta-base-sentiment-latest/deployment/_start
</pre></div>


<p>This is subject to licensing. You might face this error &#8220;<code>current license is non-compliant for [ml]</code>&#8220;. For my tests, I used a trial.</p>



<h2 class="wp-block-heading" id="h-filebeat-configuration">Filebeat Configuration</h2>



<p>I will use Filebeat to read review.csv file and ingest it into Elasticsearch. filebeat.yml looks like this:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; title: ; notranslate">
filebeat.inputs:
- type: log
  paths:
    - &#039;C:\csv_inject\*.csv&#039;

output.elasticsearch:
  hosts: &#x5B;&quot;https://localhost:9200&quot;]
  protocol: &quot;https&quot;
  username: &quot;elastic&quot;
  password: &quot;password!&quot;
  ssl:
    ca_trusted_fingerprint: fakefp4076a4cf5c1111ac586bafa385exxxxfde0dfe3cd7771ed
  
  indices:
    - index: &quot;csv&quot;
  pipeline: csv
</pre></div>


<p>So each time a new file gets into <mark class="has-inline-color has-vivid-cyan-blue-color">csv_inject</mark> folder, Filebeat will parse it and send it to my Elasticsearch setup within <mark class="has-inline-color has-luminous-vivid-orange-color">csv</mark> index.</p>



<h2 class="wp-block-heading" id="h-pipeline">Pipeline</h2>



<p>Ingest pipeline can perform basic transformation to incoming data before being indexed.</p>



<h3 class="wp-block-heading" id="h-data-transformation">Data transformation</h3>



<p>First step consists of converting <mark class="has-inline-color has-luminous-vivid-amber-color">message </mark>field, which contains one line of data, into several target fields (ie. split csv). Next, remove <mark class="has-inline-color has-luminous-vivid-amber-color">message </mark>field. This looks like this in Processors section of the Ingest pipeline:</p>



<figure class="wp-block-image size-full"><img fetchpriority="high" decoding="async" width="892" height="197" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-11_04_28-Ingest-Pipelines-Elastic-—-Mozilla-Firefox.png" alt="" class="wp-image-32587" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-11_04_28-Ingest-Pipelines-Elastic-—-Mozilla-Firefox.png 892w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-11_04_28-Ingest-Pipelines-Elastic-—-Mozilla-Firefox-300x66.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-11_04_28-Ingest-Pipelines-Elastic-—-Mozilla-Firefox-768x170.png 768w" sizes="(max-width: 892px) 100vw, 892px" /></figure>



<p>Next, I also want to replace the content of the default timestamp field (ie. <code>@timestamp</code>) with the timestamp of the review (and remove the date field after that):</p>



<figure class="wp-block-image size-full"><img decoding="async" width="602" height="117" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-11_06_49-Ingest-Pipelines-Elastic-—-Mozilla-Firefox.png" alt="" class="wp-image-32588" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-11_06_49-Ingest-Pipelines-Elastic-—-Mozilla-Firefox.png 602w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-11_06_49-Ingest-Pipelines-Elastic-—-Mozilla-Firefox-300x58.png 300w" sizes="(max-width: 602px) 100vw, 602px" /></figure>



<h3 class="wp-block-heading" id="h-inference">Inference</h3>



<p>Now, I add the <mark class="has-inline-color has-luminous-vivid-amber-color">Inference </mark>step:</p>



<figure class="wp-block-image size-full"><img decoding="async" width="1021" height="55" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-11_09_47-Ingest-Pipelines-Elastic-—-Mozilla-Firefox.png" alt="" class="wp-image-32589" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-11_09_47-Ingest-Pipelines-Elastic-—-Mozilla-Firefox.png 1021w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-11_09_47-Ingest-Pipelines-Elastic-—-Mozilla-Firefox-300x16.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-11_09_47-Ingest-Pipelines-Elastic-—-Mozilla-Firefox-768x41.png 768w" sizes="(max-width: 1021px) 100vw, 1021px" /></figure>



<p>The only customization of that step is the field map as the default input field name is &#8220;<code>text_field</code>&#8220;, In the reviews, fields is named &#8220;<code>comment</code>&#8220;:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="687" height="543" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-11_48_32-Ingest-Pipelines-Elastic-—-Mozilla-Firefox.png" alt="" class="wp-image-32593" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-11_48_32-Ingest-Pipelines-Elastic-—-Mozilla-Firefox.png 687w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-11_48_32-Ingest-Pipelines-Elastic-—-Mozilla-Firefox-300x237.png 300w" sizes="auto, (max-width: 687px) 100vw, 687px" /></figure>



<p>Optionally, but recommended, it is possible to add <strong>Failure processors</strong> which will set a field to keep track of the cause and will put them in a different index:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="647" height="171" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-11_14_46-Ingest-Pipelines-Elastic-—-Mozilla-Firefox.png" alt="" class="wp-image-32592" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-11_14_46-Ingest-Pipelines-Elastic-—-Mozilla-Firefox.png 647w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-11_14_46-Ingest-Pipelines-Elastic-—-Mozilla-Firefox-300x79.png 300w" sizes="auto, (max-width: 647px) 100vw, 647px" /></figure>



<h2 class="wp-block-heading" id="h-ingest">Ingest</h2>



<p>Now, I can simply copy the review.csv into the watched directory and Filebeat will send lines to Elasticsearch. After few minutes, I can see the first results:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="80" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-12_08_28--1024x80.png" alt="" class="wp-image-32595" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-12_08_28--1024x80.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-12_08_28--300x23.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-12_08_28--768x60.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-12_08_28--1536x120.png 1536w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-12_08_28-.png 1611w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Or, a considered negative example with the associated prediction rate:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="64" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-12_10_42--1024x64.png" alt="" class="wp-image-32596" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-12_10_42--1024x64.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-12_10_42--300x19.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-12_10_42--768x48.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-12_10_42--1536x96.png 1536w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-16-12_10_42-.png 1608w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading" id="h-what-next">What Next?</h2>



<p>Of course, we could try another model to compare results.</p>



<p>If you did not noticed, this was also a first step into Extract-transform-load topic (ETL).</p>
<p>L’article <a href="https://www.dbi-services.com/blog/elasticsearch-ingest-pipeline-and-machine-learning/">Elasticsearch, Ingest Pipeline and Machine Learning</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/elasticsearch-ingest-pipeline-and-machine-learning/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Monitor Elasticsearch Cluster with Zabbix</title>
		<link>https://www.dbi-services.com/blog/monitor-elasticsearch-cluster-with-zabbix/</link>
					<comments>https://www.dbi-services.com/blog/monitor-elasticsearch-cluster-with-zabbix/#respond</comments>
		
		<dc:creator><![CDATA[Middleware Team]]></dc:creator>
		<pubDate>Fri, 12 Apr 2024 17:37:18 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Elasticsearch]]></category>
		<category><![CDATA[Zabbix]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/?p=32466</guid>

					<description><![CDATA[<p>Setting up Zabbix monitoring over an Elasticsearch cluster is quiet easy as it does not require an agent install. As a matter a fact, the official template uses the Elastic REST API. Zabbix server itself will trigger these requests. In this blog post, I will quick explain how to setup Elasticsearch cluster, then how easy [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/monitor-elasticsearch-cluster-with-zabbix/">Monitor Elasticsearch Cluster with Zabbix</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Setting up Zabbix monitoring over an Elasticsearch cluster is quiet easy as it does not require an agent install. As a matter a fact, the <a href="https://www.zabbix.com/fr/integrations/elasticsearch#elasticsearch_http" target="_blank" rel="noreferrer noopener">official template</a> uses the Elastic REST API. Zabbix server itself will trigger these requests.</p>



<p>In this blog post, I will quick explain how to setup Elasticsearch cluster, then how easy the Zabbix setup is and list possible issues you might encounter.</p>



<h2 class="wp-block-heading" id="h-elastic-cluster-setup">Elastic Cluster Setup</h2>



<p>I will not go too much in detail as <a href="https://www.dbi-services.com/blog/author/david-diab/" target="_blank" rel="noreferrer noopener">David</a> covered already many topics around ELK. Anyway, would you need any help to install, tune or monitor your ELK cluster fell free to contact us.</p>



<p>My 3 virtual machines are provisioned with <a href="https://www.dbi-services.com/products/yak/">YaK</a> on OCI. Then, I install the rpm on all 3 nodes.</p>



<p>After starting first node service, I am generating an enrollment token with this command:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
/usr/share/elasticsearch/bin/elasticsearch-create-enrollment-token -node
</pre></div>


<p>This return a long string which I will need to pass on node 2 and 3 of the cluster (before starting anything):</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
/usr/share/elasticsearch/bin/elasticsearch-reconfigure-node --enrollment-token &lt;...&gt;
</pre></div>


<p>Output will look like that:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
This node will be reconfigured to join an existing cluster, using the enrollment token that you provided.
This operation will overwrite the existing configuration. Specifically:
  - Security auto configuration will be removed from elasticsearch.yml
  - The &#x5B;certs] config directory will be removed
  - Security auto configuration related secure settings will be removed from the elasticsearch.keystore
Do you want to continue with the reconfiguration process &#x5B;y/N]
</pre></div>


<p>After confirming with a <code>y</code>, we are almost ready to start. First, we must update ES configuration file (ie. <code>/etc/elasticsearch/elasticsearch.yml</code>).</p>



<ul class="wp-block-list">
<li>Add IP of first node (only for first boot strapped) in <code>cluster.initial_master_nodes: ["10.0.0.x"]</code></li>



<li>Set listening IP of the inter-node trafic (to do on node 1 as well): <code>transport.host: 0.0.0.0</code></li>



<li>Set list of master eligible nodes: <code>discovery.seed_hosts: ["10.0.0.x:9300"]</code></li>
</ul>



<p>Now, we are ready to start node 2 and 3.</p>



<p>Let&#8217;s check the health of our cluster:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
curl -s https://localhost:9200/_cluster/health -k -u elastic:password | jq
</pre></div>


<p>If you forgot elastic password, you can reset it with this command:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
/usr/share/elasticsearch/bin/elasticsearch-reset-password -u elastic
</pre></div>


<h2 class="wp-block-heading" id="h-zabbix-configuration">Zabbix Configuration</h2>



<p>With latest Elasticsearch release, security has drastically increased as SSL communication became the standard. Nevertheless, default MACROS values of the template did not. Thus, we have to customize the followings:</p>



<ul class="wp-block-list">
<li>{$ELASTICSEARCH.USERNAME} to elastic</li>



<li>{$ELASTICSEARCH.PASSWORD} to its password</li>



<li>{$ELASTICSEARCH.SCHEME} to https</li>
</ul>



<p>If SELinux is enabled on your Zabbix server, you will need to allow <code>zabbix_server</code> process to send network request. Following command achieves this:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
setsebool zabbix_can_network 1
</pre></div>


<p>Next, we can create a host in Zabbix UI like that:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="882" height="553" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-14_26_55-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox.png" alt="" class="wp-image-32472" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-14_26_55-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox.png 882w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-14_26_55-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox-300x188.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-14_26_55-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox-768x482.png 768w" sizes="auto, (max-width: 882px) 100vw, 882px" /></figure>



<p>The Agent interface is required but will not be used to reach any agent as there are not agent based (passive or active) checks in the linked template. However, http checks uses <mark class="has-inline-color has-luminous-vivid-orange-color">HOST.CONN</mark> MACRO in the URLs. Ideally, the IP should be a virtual IP or a load balanced IP.</p>



<p>Don&#8217;t forget to set the MACROS:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="960" height="269" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-14_32_32-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox.png" alt="" class="wp-image-32473" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-14_32_32-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox.png 960w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-14_32_32-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox-300x84.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-14_32_32-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox-768x215.png 768w" sizes="auto, (max-width: 960px) 100vw, 960px" /></figure>



<p>After few minutes, and once nodes discovery ran, you should see something like that:</p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="49" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-14_34_50-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox-1024x49.png" alt="" class="wp-image-32474" style="width:840px;height:auto" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-14_34_50-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox-1024x49.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-14_34_50-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox-300x14.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-14_34_50-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox-768x36.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-14_34_50-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox.png 1243w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading" id="h-problems">Problems</h2>



<p>What will happen if one node stops? On <em>Problems </em>tab of Zabbix UI:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="83" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-14_52_10-Zabbix-server_-Problems-—-Mozilla-Firefox-1024x83.png" alt="" class="wp-image-32476" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-14_52_10-Zabbix-server_-Problems-—-Mozilla-Firefox-1024x83.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-14_52_10-Zabbix-server_-Problems-—-Mozilla-Firefox-300x24.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-14_52_10-Zabbix-server_-Problems-—-Mozilla-Firefox-768x62.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-14_52_10-Zabbix-server_-Problems-—-Mozilla-Firefox-1536x124.png 1536w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-14_52_10-Zabbix-server_-Problems-—-Mozilla-Firefox.png 1592w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>After few seconds, I noticed that <mark class="has-inline-color has-luminous-vivid-orange-color">ES: Health is YELLOW</mark> gets resolved on its own. Why? Because shards are re-balanced across running servers.</p>



<p>I confirm this by graphing <mark class="has-inline-color has-luminous-vivid-orange-color">Number of unassigned shards</mark>:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="522" height="381" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-15_20_33-Zabbix-server_-Dashboard-—-Mozilla-Firefox.png" alt="" class="wp-image-32487" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-15_20_33-Zabbix-server_-Dashboard-—-Mozilla-Firefox.png 522w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-15_20_33-Zabbix-server_-Dashboard-—-Mozilla-Firefox-300x219.png 300w" sizes="auto, (max-width: 522px) 100vw, 522px" /></figure>



<p>We can also see the re-balancing with the network traffic monitoring:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="300" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-15_57_47-Zabbix-server_-Dashboard-—-Mozilla-Firefox-1024x300.png" alt="" class="wp-image-32524" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-15_57_47-Zabbix-server_-Dashboard-—-Mozilla-Firefox-1024x300.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-15_57_47-Zabbix-server_-Dashboard-—-Mozilla-Firefox-300x88.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-15_57_47-Zabbix-server_-Dashboard-—-Mozilla-Firefox-768x225.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-12-15_57_47-Zabbix-server_-Dashboard-—-Mozilla-Firefox.png 1379w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">Received bytes on the left. Sent on the right.</figcaption></figure>



<p>Around 15:24, I stopped node 3 and shards were redistributed from node 1 and 2.</p>



<p>When node 3 start, at 15:56, we can see node 1 and 2 (20 Mbps each) send back shards to node 3 (40 Mbps received).</p>



<h2 class="wp-block-heading" id="h-conclusion">Conclusion</h2>



<p>Whatever the monitoring tool you are using, it always help to understand what is happening behind the scene.</p>
<p>L’article <a href="https://www.dbi-services.com/blog/monitor-elasticsearch-cluster-with-zabbix/">Monitor Elasticsearch Cluster with Zabbix</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/monitor-elasticsearch-cluster-with-zabbix/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Apache httpd Tuning and Monitoring with Zabbix</title>
		<link>https://www.dbi-services.com/blog/apache-httpd-tuning-and-monitoring-with-zabbix/</link>
					<comments>https://www.dbi-services.com/blog/apache-httpd-tuning-and-monitoring-with-zabbix/#respond</comments>
		
		<dc:creator><![CDATA[Middleware Team]]></dc:creator>
		<pubDate>Tue, 09 Apr 2024 12:37:31 +0000</pubDate>
				<category><![CDATA[Application integration & Middleware]]></category>
		<category><![CDATA[HTTPD]]></category>
		<category><![CDATA[JMeter]]></category>
		<category><![CDATA[tuning]]></category>
		<category><![CDATA[Zabbix]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/?p=32385</guid>

					<description><![CDATA[<p>There is no tuning possible without a proper monitoring in place to measure the impact of any changes. Thus, before trying to tune an Apache httpd server, I will explain how to monitor it with Zabbix. Setup Zabbix Monitoring Apache httpd template provided by Zabbix uses mod_status which provides metrics about load, processes and connections. [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/apache-httpd-tuning-and-monitoring-with-zabbix/">Apache httpd Tuning and Monitoring with Zabbix</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>There is no tuning possible without a proper monitoring in place to measure the impact of any changes. Thus, before trying to tune an Apache httpd server, I will explain how to monitor it with Zabbix.</p>



<h2 class="wp-block-heading" id="h-setup-zabbix-monitoring">Setup Zabbix Monitoring</h2>



<p><strong>Apache httpd</strong> template provided by Zabbix uses <a href="https://httpd.apache.org/docs/2.4/en/mod/mod_status.html" target="_blank" rel="noreferrer noopener">mod_status</a> which provides metrics about load, processes and connections.</p>



<p>Before enabling this module, we must ensure it is present. <code>httpd -M 2&gt;/dev/null | grep status_module</code> command will tell you so. Next, we can extend configuration by creating a file in /etc/httpd/conf.d:</p>



<pre class="wp-block-code"><code>&lt;Location "/server-status"&gt;
  SetHandler server-status
&lt;/Location&gt;</code></pre>



<p>After a configuration reload, we should be able to access the URL http://&lt;IP&gt;/server-status?auto.</p>



<p>Finally, we can link the template to the host and see that data are collected:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="519" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-09-11_04_39-Zabbix-server_-Latest-data-—-Mozilla-Firefox-1024x519.png" alt="" class="wp-image-32389" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-09-11_04_39-Zabbix-server_-Latest-data-—-Mozilla-Firefox-1024x519.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-09-11_04_39-Zabbix-server_-Latest-data-—-Mozilla-Firefox-300x152.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-09-11_04_39-Zabbix-server_-Latest-data-—-Mozilla-Firefox-768x389.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-09-11_04_39-Zabbix-server_-Latest-data-—-Mozilla-Firefox.png 1118w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<h2 class="wp-block-heading" id="h-tuning">Tuning</h2>



<p>I deployed a simple static web site to the Apache httpd server. To load test that web site, nothing better than JMeter. The load test scenario is simply requesting Home, About, Services and Contact Us pages and retrieve all embedded resources during 2 minutes with 100 threads (ie. users).</p>



<p>Here are the performances on requests per seconds (right scale) and bytes per seconds (left scale):</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="687" height="332" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-09-13_45_35-Zabbix-server_-Dashboard-—-Mozilla-Firefox.png" alt="" class="wp-image-32403" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-09-13_45_35-Zabbix-server_-Dashboard-—-Mozilla-Firefox.png 687w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-09-13_45_35-Zabbix-server_-Dashboard-—-Mozilla-Firefox-300x145.png 300w" sizes="auto, (max-width: 687px) 100vw, 687px" /></figure>



<p>At most, server serves 560 req/s at 35 MBps.</p>



<p>And regarding CPU usage, it almost reaches 10%:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="702" height="327" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-09-13_46_40-Zabbix-server_-Dashboard-—-Mozilla-Firefox.png" alt="" class="wp-image-32404" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-09-13_46_40-Zabbix-server_-Dashboard-—-Mozilla-Firefox.png 702w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-09-13_46_40-Zabbix-server_-Dashboard-—-Mozilla-Firefox-300x140.png 300w" sizes="auto, (max-width: 702px) 100vw, 702px" /></figure>



<h3 class="wp-block-heading" id="h-compression">Compression</h3>



<p>Without any additional headers, Apache httpd will consider the client (here JMeter) does not support gzip. Fortunately, it is possible to set HTTP Header in JMeter. I add it at the top of the test plan so that it will apply to all HTTP Requests below:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="561" height="190" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-09-11_59_06-Simple-HTTP-Request.jmx-C__Users_ols_Documents_Technical_Load-Test_JMeter_apach.png" alt="" class="wp-image-32399" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-09-11_59_06-Simple-HTTP-Request.jmx-C__Users_ols_Documents_Technical_Load-Test_JMeter_apach.png 561w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-09-11_59_06-Simple-HTTP-Request.jmx-C__Users_ols_Documents_Technical_Load-Test_JMeter_apach-300x102.png 300w" sizes="auto, (max-width: 561px) 100vw, 561px" /></figure>



<p>Note that I enabled <a href="https://httpd.apache.org/docs/2.4/en/mod/mod_deflate.html" target="_blank" rel="noreferrer noopener">mod_deflate</a> on Apache side.</p>



<p>Let&#8217;s run another load test and compare the results!</p>



<p>After two minutes, here is what I see:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="684" height="331" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-09-13_48_52-Zabbix-server_-Dashboard-—-Mozilla-Firefox.png" alt="" class="wp-image-32405" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-09-13_48_52-Zabbix-server_-Dashboard-—-Mozilla-Firefox.png 684w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-09-13_48_52-Zabbix-server_-Dashboard-—-Mozilla-Firefox-300x145.png 300w" sizes="auto, (max-width: 684px) 100vw, 684px" /></figure>



<p>The amount of Mbps reduced to 32 which is expected as we are compressing. The amount of req/s increased by almost 100% to 1000 req/s !</p>



<p>On the CPU side, we also see a huge increase:</p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" width="699" height="332" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-09-13_52_42-Zabbix-server_-Dashboard-—-Mozilla-Firefox.png" alt="" class="wp-image-32407" style="width:699px;height:auto" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-09-13_52_42-Zabbix-server_-Dashboard-—-Mozilla-Firefox.png 699w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/04/2024-04-09-13_52_42-Zabbix-server_-Dashboard-—-Mozilla-Firefox-300x142.png 300w" sizes="auto, (max-width: 699px) 100vw, 699px" /><figcaption class="wp-element-caption">45% CPU usage</figcaption></figure>



<p>This is also more or else expected as compression requires computing.</p>



<h2 class="wp-block-heading" id="h-and-now">And Now</h2>



<p>The deployed static web site does not have any forms which would require client side compression. That will be a subject for another blog. Also, I can compare with Nginx.</p>
<p>L’article <a href="https://www.dbi-services.com/blog/apache-httpd-tuning-and-monitoring-with-zabbix/">Apache httpd Tuning and Monitoring with Zabbix</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/apache-httpd-tuning-and-monitoring-with-zabbix/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Faster Ansible</title>
		<link>https://www.dbi-services.com/blog/faster-ansible/</link>
					<comments>https://www.dbi-services.com/blog/faster-ansible/#respond</comments>
		
		<dc:creator><![CDATA[Middleware Team]]></dc:creator>
		<pubDate>Mon, 08 Apr 2024 15:03:21 +0000</pubDate>
				<category><![CDATA[Ansible]]></category>
		<category><![CDATA[YaK]]></category>
		<category><![CDATA[Performance Tuning]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[yak]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/?p=32335</guid>

					<description><![CDATA[<p>Even if Ansible is powerful and flexible, it can be considered &#8220;slow&#8221;. It will be anyway faster, and more consistent, than doing the same steps manually. Nevertheless, we will experiment to make it even faster. I found few of them on the Internet, but rarely with figures of what to expect. In this blog post, [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/faster-ansible/">Faster Ansible</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Even if Ansible is powerful and flexible, it can be considered &#8220;slow&#8221;. It will be anyway faster, and more consistent, than doing the same steps manually. Nevertheless, we will experiment to make it even faster. I found few of them on the Internet, but rarely with figures of what to expect.</p>



<p>In this blog post, I will cover one of them and run different scenarios. We will also dig inside some internal mechanism used by Ansible.</p>



<h2 class="wp-block-heading" id="h-ssh-connections">SSH Connections</h2>



<p>Ansible is connection intensive as it opens, and closes, many ssh connections to the targeted hosts.</p>



<p>I found two possible ways to count the amount of connections from control to agents nodes:</p>



<ul class="wp-block-list">
<li>Add <code>-vvv</code> option to the ansible-playbook command.</li>



<li>grep audit.log file:</li>
</ul>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
tail -f /var/log/audit/audit | grep USER_LOGIN
</pre></div>


<p>First option is really too much verbose, but I used it with the first playbook below to confirm the second option give the same count.</p>



<h2 class="wp-block-heading" id="h-simple-playbook">Simple Playbook</h2>



<p>To demonstrate that, let&#8217;s start with a very minimal playbook <span style="text-decoration: underline">without</span> fact gathering:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; title: ; notranslate">
---
- name: Test playbook
  hosts: all
  gather_facts: false
  pre_tasks:
    - name: &quot;ping&quot;
      ansible.builtin.ping:
...
</pre></div>


<p>This playbook triggered <strong>8</strong> ssh connections to the target host. If I enable facts gathering, count goes to <strong>14</strong> connections. Again, this is quiet a lot knowing that playbook does not do much beside check target is alive.</p>



<p>To summarize:</p>



<figure class="wp-block-table is-style-stripes"><table><tbody><tr><td><strong>gather_facts</strong></td><td><strong>connections</strong></td><td><strong>timing (s)</strong></td></tr><tr><td>false</td><td>8</td><td>1,277</td></tr><tr><td>true</td><td>14</td><td>1,991</td></tr></tbody></table><figcaption class="wp-element-caption">ping playbook results</figcaption></figure>



<h2 class="wp-block-heading" id="h-what-are-all-these-connection-for">What are All These Connection For?</h2>



<p>To determine what are these connections doing, we can analyze verbose (really verbose!!) output of Ansible playbook without fact gathering.</p>



<h3 class="wp-block-heading" id="h-first-connection">First Connection</h3>



<p>First command of first connection is <code>echo ~opc &amp;&amp; sleep 0</code> which will return the home directory of ansible user.</p>



<h3 class="wp-block-heading" id="h-second">Second</h3>



<p>Second command is already scary:</p>



<pre class="wp-block-code"><code>( umask 77 &amp;&amp; mkdir -p "` echo /home/opc/.ansible/tmp `"&amp;&amp; mkdir "` echo /home/opc/.ansible/tmp/ansible-tmp-1712570792.3350322-23674-205520350912482 `" &amp;&amp; echo ansible-tmp-1712570792.3350322-23674-205520350912482="` echo /home/opc/.ansible/tmp/ansible-tmp-1712570792.3350322-23674-205520350912482 `" ) &amp;&amp; sleep 0</code></pre>



<ol class="wp-block-list">
<li>It set the umask for the commands to follow.</li>



<li>Create tmp directory to store any python script on target</li>



<li>In that directory, create a directory to store the script for this specific task</li>



<li>Makes this ssh command return the temporary variable with full path to the task script directory</li>



<li>sleep 0</li>
</ol>



<p>This one is mainly to ensure directory structure exists on the target.</p>



<h3 class="wp-block-heading" id="h-third">Third</h3>



<p>I will not paste this one here as it is very long and we can easily guess what it does with log just before:</p>



<pre class="wp-block-code"><code>Attempting python interpreter discovery</code></pre>



<p>Roughly, what it does, it tries many <a href="https://github.com/ansible/ansible/blob/61e18572bbee2431b71bcfdb8e5f74dacda98325/lib/ansible/config/base.yml#L1511C1-L1511C28" target="_blank" rel="noreferrer noopener">versions</a> of python.</p>



<h3 class="wp-block-heading" id="h-fourth">Fourth</h3>



<p>Next, it will run a python script with discovered python version to determine Operating System type and release.</p>



<h3 class="wp-block-heading" id="h-fifth">Fifth</h3>



<p>Fifth connection is actually a sftp command to copy module content (AnsiballZ_ping.py). AnsiballZ is a framework to embed module into script itself. This allows to be run modules with a single Python copy.</p>



<h3 class="wp-block-heading" id="h-seventh">Seventh</h3>



<p>This one is simply ensuring execution permission is set on temporary directory (ie. ansible-tmp-1712570792.3350322-23674-205520350912482) as well the python script (ie. AnsiballZ_ping.py).</p>



<h3 class="wp-block-heading" id="h-eighth-and-last-connection">Eighth and Last Connection</h3>



<p>Lastly, the execution of the ping module itself:</p>



<pre class="wp-block-code"><code>/usr/bin/python3.9 /home/opc/.ansible/tmp/ansible-tmp-1712570792.3350322-23674-205520350912482/AnsiballZ_ping.py &amp;&amp; sleep 0</code></pre>



<h2 class="wp-block-heading" id="h-optimization">Optimization</h2>



<p>To reduce the amount of connection, there is one possible option: Pipelining</p>



<p>To enable that, I simply need to add following line in ansible.cfg:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: plain; title: ; notranslate">
pipelining = true
</pre></div>


<p>Or set <code>ANSIBLE_PIPELINING</code> environment variable to <mark class="has-inline-color has-luminous-vivid-orange-color">true</mark>.</p>



<p>How does it improve our playbook execution time:</p>



<figure class="wp-block-table is-style-stripes"><table><tbody><tr><td><strong>gather_facts</strong></td><td><strong>connections</strong></td><td><strong>timing (s)</strong></td></tr><tr><td>false</td><td>3 (-62%)</td><td>0,473 (-63%)</td></tr><tr><td>true</td><td>4 (-71%)</td><td>1,275 (-36%)</td></tr></tbody></table><figcaption class="wp-element-caption">ping playbook results with pipelining</figcaption></figure>



<p>As we can see there is a significant reduction on the amount of ssh connections as well as a reduction of the playbook duration.</p>



<p>In this configuration, only 3 connections are made:</p>



<ul class="wp-block-list">
<li>python interpreter discovery (connection #3)</li>



<li>OS type discovery (connection #4)</li>



<li>python module execution (connection #8). AnsiballZ data is piped to that process.</li>
</ul>



<p>With the pipelining option, I also noticed that the Ansible temporary directory is not created.</p>



<p>Of course, we can&#8217;t expect such big speed-up on a real life playbook. So, we should do it now.</p>



<h2 class="wp-block-heading" id="h-deploy-weblogic-server-playbook">Deploy WebLogic Server Playbook</h2>



<p>Let&#8217;s use the WebLogic <a href="https://www.dbi-services.com/products/yak/">YaK</a> component to deploy a single WebLogic instance. It includes dbi service best practices, latest CPU patches and SSL configuration. The &#8220;normal&#8221; run takes 13 minutes 30 seconds when the pipelined run takes 12 minutes 13 seconds. This is <mark class="has-inline-color has-luminous-vivid-orange-color">10% faster</mark>.</p>



<p>This is nice, but not as good as previous playbook. Why is that? Because most of the time is not spent in ssh connections, but with actual work (running WebLogic installer, starting services, patching with OPatch, etc).</p>



<h2 class="wp-block-heading" id="h-what-next">What Next?</h2>



<p>With such results, you might wonder why isn&#8217;t it enabled by default? As per documentation, there is a limitation:</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow">
<p>This can conflict with privilege escalation (become). For example, when using sudo operations you must first disable ‘requiretty’ in the sudoers file for the target hosts, which is why this feature is disabled by default.</p>
<cite><a href="https://docs.ansible.com/ansible/latest/reference_appendices/config.html#ansible-pipelining">Ansible documentation</a></cite></blockquote>



<p>Until now, with all tests I have made, I never encountered that limitation. <strong>Did you?</strong></p>
<p>L’article <a href="https://www.dbi-services.com/blog/faster-ansible/">Faster Ansible</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/faster-ansible/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Monitor Kubernetes with Zabbix</title>
		<link>https://www.dbi-services.com/blog/monitor-kubernetes-with-zabbix/</link>
					<comments>https://www.dbi-services.com/blog/monitor-kubernetes-with-zabbix/#respond</comments>
		
		<dc:creator><![CDATA[Middleware Team]]></dc:creator>
		<pubDate>Tue, 27 Feb 2024 14:26:53 +0000</pubDate>
				<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Kubernetes]]></category>
		<category><![CDATA[kubernetes]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Zabbix]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/?p=31382</guid>

					<description><![CDATA[<p>Zabbix might not be the first monitoring tool that comes in mind when you want to monitor a Kubernetes cluster (Did you say Prometheus? 🙂 ). Nevertheless, as an open-source project, Zabbix have affinities with others open-source projects. In this blog post, we will see how easy it is to monitor a Kubernetes cluster with [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/monitor-kubernetes-with-zabbix/">Monitor Kubernetes with Zabbix</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Zabbix might not be the first monitoring tool that comes in mind when you want to monitor a Kubernetes cluster (Did you say Prometheus? <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> ). Nevertheless, as an open-source project, Zabbix have affinities with others open-source projects.</p>



<p>In this blog post, we will see how easy it is to monitor a Kubernetes cluster with Zabbix.</p>



<h2 class="wp-block-heading" id="h-monitoring-architecture">Monitoring Architecture</h2>



<p>As Kubernetes is a container orchestration system for automating software deployment [&#8230;] (<a href="https://en.wikipedia.org/wiki/Kubernetes" target="_blank" rel="noreferrer noopener">wikipedia</a>), you don&#8217;t want to manually install a Zabbix agent on each node of the cluster. With that in mind, Zabbix developed a helm chart to deploy what is required to monitor the cluster:</p>



<ul class="wp-block-list">
<li>A DaemonSet on all cluster nodes for Zabbix agent (one agent per node)</li>



<li>A single replica deployment for the Zabbix proxy who will act as a collection point for all Zabbix agents</li>
</ul>



<p>The Zabbix proxy will run in ActiveMode meaning that it will get configuration from Zabbix server and push data to it.</p>



<h2 class="wp-block-heading" id="h-kubernetes-preparation">Kubernetes Preparation</h2>



<p>Among all the customizable values of the <a href="https://git.zabbix.com/projects/ZT/repos/kubernetes-helm/browse/values.yaml" target="_blank" rel="noreferrer noopener">helm chart</a>, the most important is the Zabbix server IP/hostname as Zabbix proxy requires it to push data to Zabbix server:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; title: ; notranslate">
    - name: ZBX_SERVER_HOST
      value: &quot;192.168.x.y&quot;
</pre></div>


<p>Once the chart has been installed in the dedicated monitoring namespace of your Kubernetes cluster, we should be able to see the pods:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
$ kubectl get pods -n monitoring
NAME                                         READY   STATUS    RESTARTS   AGE
zabbix-agent-lbwsg                           1/1     Running   0          15m
zabbix-kube-state-metrics-64aac65c45-g9n94   1/1     Running   0          15m
zabbix-proxy-5b4faaff64-xf8wk                1/1     Running   0          15m
</pre></div>


<h2 class="wp-block-heading" id="h-zabbix-web-ui">Zabbix Web UI</h2>



<p>On Zabbix side, we must create the zabbix proxy:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="742" height="325" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/2024-02-27-15_01_08-Zabbix-server_-Configuration-of-proxies-—-Mozilla-Firefox.png" alt="" class="wp-image-31386" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/2024-02-27-15_01_08-Zabbix-server_-Configuration-of-proxies-—-Mozilla-Firefox.png 742w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/2024-02-27-15_01_08-Zabbix-server_-Configuration-of-proxies-—-Mozilla-Firefox-300x131.png 300w" sizes="auto, (max-width: 742px) 100vw, 742px" /></figure>



<p>Next, we can create a &#8220;fake&#8221; host as it does not really correspond to any host. It is just a place holder for the configuration that must be provided to Zabbix proxy:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="653" height="518" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/2024-02-27-15_09_00-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox.png" alt="" class="wp-image-31387" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/2024-02-27-15_09_00-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox.png 653w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/2024-02-27-15_09_00-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox-300x238.png 300w" sizes="auto, (max-width: 653px) 100vw, 653px" /></figure>



<p>There is no need to set an interface as the selected template will not use it anyway. In the Macros tab, we must set two of them:</p>



<ul class="wp-block-list">
<li>{$KUBE.API.URL}</li>



<li>{$KUBE.API.TOKEN}</li>
</ul>



<p>Thus, it will look like this:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="944" height="247" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/2024-02-27-15_10_58-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox.png" alt="" class="wp-image-31388" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/2024-02-27-15_10_58-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox.png 944w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/2024-02-27-15_10_58-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox-300x78.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/2024-02-27-15_10_58-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox-768x201.png 768w" sizes="auto, (max-width: 944px) 100vw, 944px" /></figure>



<p>After a couple of minutes, you will see a new host with Zabbix agent in green:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="83" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/2024-02-27-13_05_07-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox-1024x83.png" alt="" class="wp-image-31389" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/2024-02-27-13_05_07-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox-1024x83.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/2024-02-27-13_05_07-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox-300x24.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/2024-02-27-13_05_07-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox-768x62.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/2024-02-27-13_05_07-Zabbix-server_-Configuration-of-hosts-—-Mozilla-Firefox.png 1341w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>The IP 192.168.49.2 is an IP internal the Kubernetes cluster (here provisioned with <a href="https://minikube.sigs.k8s.io/docs/" target="_blank" rel="noreferrer noopener">minikube</a> on a raspberry pi 4).</p>
<p>L’article <a href="https://www.dbi-services.com/blog/monitor-kubernetes-with-zabbix/">Monitor Kubernetes with Zabbix</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/monitor-kubernetes-with-zabbix/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Configure Zabbix with Ansible</title>
		<link>https://www.dbi-services.com/blog/configure-zabbix-with-ansible/</link>
					<comments>https://www.dbi-services.com/blog/configure-zabbix-with-ansible/#comments</comments>
		
		<dc:creator><![CDATA[Middleware Team]]></dc:creator>
		<pubDate>Tue, 13 Feb 2024 13:14:19 +0000</pubDate>
				<category><![CDATA[Ansible]]></category>
		<category><![CDATA[DevOps]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Zabbix]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/?p=30881</guid>

					<description><![CDATA[<p>Besides the ability to setup your Zabbix server, proxy and agents, the Ansible collection for Zabbix (ie. community.zabbix) also allows to configure every aspects of your Zabbix system. From hosts to users, discovery rules or even templates. In this blog post, we will see how this module helped me to automatically configure hosts I provision [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/configure-zabbix-with-ansible/">Configure Zabbix with Ansible</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Besides the ability to setup your Zabbix server, proxy and agents, the Ansible collection for Zabbix (ie. <a href="https://docs.ansible.com/ansible/latest/collections/community/zabbix/index.html" target="_blank" rel="noreferrer noopener">community.zabbix</a>) also allows to configure every <a href="https://docs.ansible.com/ansible/latest/collections/community/zabbix/index.html#plugin-index" target="_blank" rel="noreferrer noopener">aspects</a> of your Zabbix system. From hosts to users, discovery rules or even templates. In this blog post, we will see how this module helped me to <strong>automatically</strong> configure hosts I provision with YaK in my Zabbix server configuration.</p>



<h2 class="wp-block-heading" id="h-setup-community-zabbix">Setup community.zabbix</h2>



<p>The first step is easy and fast. In your <a href="https://www.dbi-services.com/products/yak/" target="_blank" rel="noreferrer noopener">YaK</a> environment, run the following command:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: bash; title: ; notranslate">
ansible-galaxy collection install community.zabbix
</pre></div>


<p>This collection is actually an interface with <a href="https://www.zabbix.com/documentation/current/en/manual/api" target="_blank" rel="noreferrer noopener">Zabbix API</a> which make our work easier when we already know Ansible and don&#8217;t want to go through complex HTTP API calls (see my other <a href="https://www.dbi-services.com/blog/zabbix-configuration-with-api/" target="_blank" rel="noreferrer noopener">blog post</a> about it).</p>



<h2 class="wp-block-heading" id="h-setup-ansible-variables">Setup Ansible Variables</h2>



<p>If you know Ansible, you know that all tasks are going through a ssh connection to the target host. Once agent is installed on target host, we want to configure it in Zabbix server. This is achieved by modifying few variables before calling zabbix modules:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; title: ; notranslate">
- name: Set api configuration facts
  ansible.builtin.set_fact:
    ansible_network_os: community.zabbix.zabbix
    ansible_connection: httpapi
    ansible_httpapi_port: 80
    ansible_zabbix_url_path: &#039;&#039;
    ansible_host: &quot;{{ zabbix_server_ip }}&quot; # Zabbix server
    ansible_user: &quot;{{ zabbix_api_login_user }}&quot;
</pre></div>


<p>For requests to be redirected, all tasks concerning our host must go to the zabbix server (line 7). Zabbix server does not understand ssh connection, but <code>httpapi</code> connections (line 4) with <code>ansible_network_os </code>specific to the API (line 3). Authentication against the http api is made with <code>ansible_user</code> as login and <code>ansible_httpapi_pass</code> as password. For better security, we could create an API token and use https.</p>



<h2 class="wp-block-heading" id="h-usage">Usage</h2>



<h4 class="wp-block-heading" id="h-host-group">Host Group</h4>



<p>Before creating our host, we can start with a simpler task like creating a host group:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; title: ; notranslate">
- name: Create host groups
  community.zabbix.zabbix_group:
    host_group: &quot;{{ zabbix_agent_groups }}&quot;
  register: zabbix_api_hostgroup_created
  until: zabbix_api_hostgroup_created is succeeded
</pre></div>


<p>This task calls <code>zabbix_group</code> module with a list of group in <code>host_group</code> argument. Could it be more easier than that?</p>



<p>Note that lines 4 and 5 are there to ensure host group is created as concurrent access (while running against multiple hosts) might raise creation failure. The default value for <code>retries</code> is 3 and with a delay of 5 seconds between each retry.</p>



<h4 class="wp-block-heading" id="h-host">Host</h4>



<p>To create a host in Zabbix configuration, there are a bit more variables to provide to the module:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; title: ; notranslate">
- name: Create host in zabbix server configuration
  community.zabbix.zabbix_host:
    host_name: &quot;{{ hostname }}&quot;
    host_groups: &quot;{{ zabbix_agent_groups }}&quot;
    link_templates: &quot;{{ zabbix_agent_link_templates }}&quot;
    interfaces: &quot;{{ zabbix_agent_interfaces }}&quot;
    tags: &quot;{{ zabbix_agent_tags }}&quot;
    tls_connect: 2 # PSK
    tls_psk_identity: &quot;{{ zabbix_agent2_tlspskidentity }}&quot;
    tls_psk: &quot;{{ zabbix_agent2_tlspsk_secret }}&quot;
  register: zabbix_api_host_created
  until: zabbix_api_host_created is succeeded
</pre></div>


<p><code>host_name</code> is the how the host will be named in Zabbix configuration (coming from inventory &#8211; line 3). <code>host_groups</code> is the list of groups we&#8217;ve created previously. <code>link_templates</code> is a list of Zabbix templates.</p>



<p><code>interfaces</code> (line 6) will be the list of defined interfaces to reach the Zabbix agent from the Zabbix server. This variable content looks like:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: yaml; title: ; notranslate">
    zabbix_agent_interfaces:
      - type: 1
        main: 1
        useip: &quot;{{ zabbix_useuip }}&quot;
        ip: &quot;{{ ansible_host }}&quot;
        dns: &quot;&quot;
        port: &quot;{{ zabbix_agent_listenport }}&quot;
</pre></div>


<p>Next <code>tls_*</code> variables are set to encrypt trafic between agent and server.</p>



<p><code>tags</code> variable allows to have host added with tags in Zabbix configuration.</p>



<p>Et voilà!</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="69" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/2024-02-13-14_03_25-Configuration-of-hosts-—-Mozilla-Firefox-1024x69.png" alt="" class="wp-image-30907" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/2024-02-13-14_03_25-Configuration-of-hosts-—-Mozilla-Firefox-1024x69.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/2024-02-13-14_03_25-Configuration-of-hosts-—-Mozilla-Firefox-300x20.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/2024-02-13-14_03_25-Configuration-of-hosts-—-Mozilla-Firefox-768x52.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/2024-02-13-14_03_25-Configuration-of-hosts-—-Mozilla-Firefox.png 1180w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
<p>L’article <a href="https://www.dbi-services.com/blog/configure-zabbix-with-ansible/">Configure Zabbix with Ansible</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/configure-zabbix-with-ansible/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Why businesses &#8211; regardless of their size &#8211; have an interest in using an ECM/IIM solution?</title>
		<link>https://www.dbi-services.com/blog/ecm-iim-solutions-for-any-size-of-business/</link>
					<comments>https://www.dbi-services.com/blog/ecm-iim-solutions-for-any-size-of-business/#respond</comments>
		
		<dc:creator><![CDATA[Middleware Team]]></dc:creator>
		<pubDate>Thu, 08 Feb 2024 15:36:53 +0000</pubDate>
				<category><![CDATA[Enterprise content management]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/?p=30699</guid>

					<description><![CDATA[<p>In today&#8217;s business landscape, everyone is facing a crucial dilemma: how to store my information? How to secure my data? How to manage my content processes? How to make my data more intelligent? Which solution to use? In this blog, I will show you that, whatever the size of the business, a company should use [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/ecm-iim-solutions-for-any-size-of-business/">Why businesses &#8211; regardless of their size &#8211; have an interest in using an ECM/IIM solution?</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="292" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-19-1024x292.png" alt="" class="wp-image-30772" style="width:842px;height:auto" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-19-1024x292.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-19-300x86.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-19-768x219.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-19.png 1380w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>In today&#8217;s business landscape, everyone is facing a crucial dilemma: how to store my information? How to secure my data? How to manage my content processes? How to make my data more intelligent? Which solution to use? </p>



<p>In this blog, I will show you that, whatever the size of the business, a company should use an ECM/IIM solution to digitally manage the information<strong> </strong>to support its processes and business goals.</p>



<h2 class="wp-block-heading" id="h-what-is-it">What is it?</h2>



<p>An <strong>ECM</strong> &#8211; <strong>Enterprise Content Management</strong> &#8211; is a combination of methods and strategies used to collect, manage, and deliver information in various forms. Information is also stored and archived for future use.</p>



<p>But ECM is not able to manage and analyze unstructured content like emails, rich media, invoices and other records, analytics and more. That&#8217;s where IIM arrived as a rebirth of ECM.</p>



<p><strong>IIM</strong> &#8211; <strong>Intelligent Information Management</strong> &#8211; is the solution to address the growing demands for increased capacity, seamless information integration, time efficiency, and cost savings. In order for you to access all the data you were missing before.</p>



<h2 class="wp-block-heading" id="h-what-does-it-do">What does it do?</h2>


<div class="wp-block-image">
<figure class="alignright size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="585" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-20-1024x585.png" alt="" class="wp-image-30785" style="width:359px;height:auto" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-20-1024x585.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-20-300x171.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-20-768x439.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-20.png 1480w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p>An ECM/IIM&nbsp;solution is not only scanning, storing and retrieving information but a strategic system for collecting data and organizing information. It digitalizes, controls and automates the flow of unstructured information within an organization. It also captures, reads, analyzes and indexes the information. You can annotate, edit or improve the information. It offers workflow and automation tools to ensure that information goes through to the correct approval processes within your organization and is assigned to the right people at the right time.</p>



<h2 class="wp-block-heading" id="h-why-is-it-important-to-have-such-solution">Why is it important to have such solution?</h2>


<div class="wp-block-image">
<figure class="alignleft size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="585" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-21-1024x585.png" alt="" class="wp-image-30786" style="width:364px;height:auto" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-21-1024x585.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-21-300x171.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-21-768x439.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-21.png 1480w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p>Having a lot of information to manage, it is not a simple task for a business: store the information, classify the information, retrieve the information&#8230; An ECM/IIM solution can help you do just that, and facilitate the routines for processing and analyzing your information in your company. For example, when your information is unorganized, such a solution can help you to structure it. When you need to establish different level of access on the information based on some criteria, such as the departments within your business. When you have a lot of paper format information and you want to digitalize it all. </p>



<p>Regardless of your business&#8217;s size or industry, an ECM/IIM solution brings you a lot of advantages!</p>



<h2 class="wp-block-heading" id="h-who-is-it-for">Who is it for?</h2>


<div class="wp-block-image">
<figure class="alignright size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="771" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-22-1024x771.png" alt="" class="wp-image-30787" style="width:313px;height:auto" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-22-1024x771.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-22-300x226.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-22-768x578.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-22.png 1380w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p>At the beginning, ECM/IIM solutions were for large companies because of the cost (infrastructure, licenses, maintenance) and the need of IT teams to implement and manage them. This is not the case anymore! Many ECM/IIM solutions are now affordable and accessible for small and medium-sized businesses, thanks to technological advances, which have virtually eliminated the need of heavy IT resources. The systems became more user-friendly and easier to implement and manage by non-IT people. </p>



<p>Recently, the low-code/no-code for ECM/IIM solutions are a simple and cost-effective way of developing applications without specialized people. Using a straightforward visual interface and drag-and-drop tools, you can reduce the workload on your IT teams and achieve a faster time-to-market of your ECM/IIM solution.</p>



<p>ECM/IIM solutions are now equally suited to all industries or businesses.</p>



<p>Here are some examples:</p>


<div class="wp-block-image">
<figure class="alignleft size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="585" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-17-1024x585.png" alt="" class="wp-image-30764" style="width:338px;height:auto" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-17-1024x585.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-17-300x171.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-17-768x439.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-17.png 1480w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p><strong>Healthcare</strong> <strong>industries</strong> has embraced ECM/IIM solutions to reduce costs and improve patient care by managing all their information. &nbsp;Patient information, medications, electronic medical records (EMR), physician notes and lab results are some of the examples. Loosing time  to search for patient information — or worse, not knowing it exists — could generate errors and have devastating consequences. In addition, to automate all quality and document management related processes, healthcare industries are using <strong>QMS</strong> &#8211; Quality Management System &#8211; solutions.</p>


<div class="wp-block-image">
<figure class="alignright size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="589" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-8-1024x589.png" alt="" class="wp-image-30755" style="width:349px;height:auto" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-8-1024x589.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-8-300x173.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-8-768x442.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-8.png 1480w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p><strong>Banks</strong> and <strong>financial services</strong> are good candidates for ECM/IIM solutions. They manage a high-volume transactions which involves manual document processing. Such solutions digitizes the reports and documents to streamline business processes, improves the speed of business operations, decisions and enhances customer service with a complete customer view. </p>


<div class="wp-block-image">
<figure class="alignleft size-full is-resized"><img loading="lazy" decoding="async" width="626" height="447" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-9.png" alt="" class="wp-image-30756" style="width:255px;height:auto" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-9.png 626w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-9-300x214.png 300w" sizes="auto, (max-width: 626px) 100vw, 626px" /></figure>
</div>


<p><strong>Administrative departments</strong> (HR, Financial, Marketing&#8230;) of any companies also needs ECM/IIM solutions to manage all the personal information of their employees (like CVs, motivation letter, contracts, certification, payslips&#8230;) but also the client or providers information (like contact info, invoices, contracts&#8230;), templates documents, internal documentation.</p>


<div class="wp-block-image">
<figure class="alignright size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="683" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-10-1024x683.png" alt="" class="wp-image-30757" style="width:343px;height:auto" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-10-1024x683.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-10-300x200.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-10-768x512.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-10.png 1380w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p><strong>Retail establishment</strong> can use ECM/IIM solutions to run merchandising and supply chain functions as cost-effectively and efficiently as possible. They use it to manage their supplier contracts, orders and shipments and to better understand customers and the markets trends. Providing current and accurate product information allows to improve employee productivity. The use of ECM/IIM solutions enable them to react more quickly to changing market demands, and considerably reduce document storage and handling costs.</p>


<div class="wp-block-image">
<figure class="alignleft size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="683" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-11-1024x683.png" alt="" class="wp-image-30758" style="width:351px;height:auto" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-11-1024x683.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-11-300x200.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-11-768x512.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-11.png 1380w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p><strong>Manufacturing industries</strong> are also using ECM/IIM solutions to provide a unified platform for all content and data across the enterprise. It is perfect for organizing product data, processing invoices, and managing employee information. It helps managers automate complex business process to<br>reduce processing times within the enterprise, including project management, financial and procurement services, human resources, compliance and many other areas. </p>


<div class="wp-block-image">
<figure class="alignright size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="585" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-12-1024x585.png" alt="" class="wp-image-30759" style="width:348px;height:auto" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-12-1024x585.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-12-300x171.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-12-768x439.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-12.png 1480w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p><strong>Colleges, universities and other educational institutions</strong> accumulate a lot of records which need to be secured, organized, and easily retrieved. That&#8217;s why they use   ECM/IIM solutions to digitize their documents and formally manage their electronic content. They can store student and employee records digitally, handle applications with electronic workflows, preserve media and documents digitally and automate routine processes.</p>


<div class="wp-block-image">
<figure class="alignleft size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="643" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-13-1024x643.png" alt="" class="wp-image-30760" style="width:350px;height:auto" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-13-1024x643.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-13-300x188.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-13-768x483.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-13.png 1380w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p><strong>Governments and municipalities</strong> are also using high volumes of documents, including a lot of paper documents. Their document management needs can be unique, and errors can cause serious consequences. They have complicated processes and requirements for document flow. Using ECM/IIM solutions can help them to reduce the footprint, automate their paper workflows, ensure their document security and regulatory compliance and reduce a lot administrative tasks and unnecessary bureaucracy.</p>



<p>As you can see, a lot of businesses are using ECM/IIM solutions in order to control and manage their critical information. They realized that they can save time and money. Visibility and control are the key words. </p>



<h2 class="wp-block-heading" id="h-conclusion">Conclusion</h2>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="585" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-14-1024x585.png" alt="" class="wp-image-30761" style="width:380px;height:auto" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-14-1024x585.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-14-300x171.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-14-768x439.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-14.png 1480w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>
</div>


<p>ECM/IIM solutions can be used by any size of industries or businesses. It is a fact! Any kind of business looking for a solution to cut costs, improve productivity, and streamline business processes will benefit from ECM/IIM solutions. The amount of data generated and manipulated by businesses is increasing a lot, every year, so using such solutions is an excellent way to gain control of the content and save money in your organization, regardless of its size.</p>



<h2 class="wp-block-heading" id="h-our-offer-at-dbi-services">Our offer at dbi services</h2>



<p><strong>dbi services</strong> is specialized in the integration of content management solutions. Our expertise in database, middleware technologies and operating systems guarantees quality implementation of ECM/IIM solutions in your IT infrastructure.</p>



<p>We offer:</p>



<ul class="wp-block-list">
<li><strong>Enhanced expertise</strong>: With a deep understanding of content management solutions, our team ensures superior quality ECM/IIM implementations.</li>



<li><strong>Increased security and compliance</strong>: We adhere to the highest standards to protect your data.</li>



<li><strong>Tailored and effective solution</strong>: We finely tune ECM/IIM solutions to your specific needs, boosting the efficiency of your organization.</li>
</ul>



<p>Our solutions:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="1014" height="80" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-25.png" alt="" class="wp-image-30842" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-25.png 1014w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-25-300x24.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/image-25-768x61.png 768w" sizes="auto, (max-width: 1014px) 100vw, 1014px" /></figure>


<div class="wp-block-image">
<figure class="aligncenter size-large is-resized"><a href="https://www.dbi-services.com"><img loading="lazy" decoding="async" width="1024" height="349" src="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/dbi-services-by-sequotech-01-1-1-1024x349.png" alt="" class="wp-image-30823" style="width:288px;height:auto" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/dbi-services-by-sequotech-01-1-1-1024x349.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/dbi-services-by-sequotech-01-1-1-300x102.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/dbi-services-by-sequotech-01-1-1-768x262.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/dbi-services-by-sequotech-01-1-1-1536x523.png 1536w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/02/dbi-services-by-sequotech-01-1-1-2048x697.png 2048w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></a></figure>
</div>


<hr class="wp-block-separator has-alpha-channel-opacity" />



<p>For more information: <a href="https://www.dbi-services.com/expertises/enterprise-content-management-ecm" target="_blank" rel="noreferrer noopener">https://www.dbi-services.com/expertises/enterprise-content-management-ecm</a></p>
<p>L’article <a href="https://www.dbi-services.com/blog/ecm-iim-solutions-for-any-size-of-business/">Why businesses &#8211; regardless of their size &#8211; have an interest in using an ECM/IIM solution?</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/ecm-iim-solutions-for-any-size-of-business/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Zabbix Web Monitoring</title>
		<link>https://www.dbi-services.com/blog/zabbix-web-monitoring/</link>
					<comments>https://www.dbi-services.com/blog/zabbix-web-monitoring/#respond</comments>
		
		<dc:creator><![CDATA[Middleware Team]]></dc:creator>
		<pubDate>Tue, 30 Jan 2024 17:35:35 +0000</pubDate>
				<category><![CDATA[Application integration & Middleware]]></category>
		<category><![CDATA[health monitoring]]></category>
		<category><![CDATA[M-Files]]></category>
		<category><![CDATA[Monitoring]]></category>
		<category><![CDATA[Zabbix]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/?p=30590</guid>

					<description><![CDATA[<p>Zabbix allows to create complex web monitoring scenario and gather metrics about it. In this blog post, we will see how to assess that we are able to login to M-Files web application and, to not consume too many licenses, to logout. Login In my &#8220;M-Files by Zabbix agent active&#8221; template, I create a new [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/zabbix-web-monitoring/">Zabbix Web Monitoring</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Zabbix allows to create complex <a href="https://www.zabbix.com/documentation/current/en/manual/web_monitoring" target="_blank" rel="noreferrer noopener">web monitoring</a> scenario and gather metrics about it. In this blog post, we will see how to assess that we are able to login to M-Files web application and, to not consume too many licenses, to logout.</p>



<h2 class="wp-block-heading" id="h-login">Login</h2>



<p>In my &#8220;<em>M-Files by Zabbix agent active</em>&#8221; template, I create a new scenario named &#8220;<em>Login/Logout</em>&#8221; where I define two variables:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="822" height="486" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-12_51_04-Configuration-of-web-monitoring-—-Mozilla-Firefox.png" alt="" class="wp-image-30593" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-12_51_04-Configuration-of-web-monitoring-—-Mozilla-Firefox.png 822w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-12_51_04-Configuration-of-web-monitoring-—-Mozilla-Firefox-300x177.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-12_51_04-Configuration-of-web-monitoring-—-Mozilla-Firefox-768x454.png 768w" sizes="auto, (max-width: 822px) 100vw, 822px" /></figure>



<p>On the left side, it is the name of the variable which be used in any parameters of the web request (Headers, Steps). On the right, it is a template MACRO which can then be set at host level.</p>



<p>Next, I go in Steps tab and add the Login step:</p>



<figure class="wp-block-image size-full is-resized"><img loading="lazy" decoding="async" width="699" height="768" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-12_54_14-Configuration-of-web-monitoring-—-Mozilla-Firefox.png" alt="" class="wp-image-30594" style="width:750px" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-12_54_14-Configuration-of-web-monitoring-—-Mozilla-Firefox.png 699w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-12_54_14-Configuration-of-web-monitoring-—-Mozilla-Firefox-273x300.png 273w" sizes="auto, (max-width: 699px) 100vw, 699px" /></figure>



<p>You might wonder &#8220;<em>Where did he get the URL and the raw post data?</em>&#8221; I took it from my previous recordings made with JMeter (see this <a href="https://www.dbi-services.com/blog/load-test-m-files-server-with-jmeter/" target="_blank" rel="noreferrer noopener">blog post</a>).</p>



<p>Inside that raw data, which is in JSON format, I map the variables we declared in scenario (ie. {username} and {password}):</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: jscript; first-line: 62; title: ; notranslate">
...
            &quot;credentials&quot;: {
                &quot;username&quot;: &quot;${username}&quot;,
                &quot;password&quot;: &quot;${password}&quot;,
                &quot;domain&quot;: &quot;&quot;,
                &quot;type&quot;: &quot;CREDENTIALS_TYPE_AUTOMATIC&quot;
            }
...
</pre></div>


<p>Note that the above code is only a partial extract of Raw post content.</p>



<p>To determine if request is successful or not, it used the two bottom fields:</p>



<ul class="wp-block-list">
<li>Required string</li>



<li>Required status codes</li>
</ul>



<p>I know from experience that we expect the standard HTTP status 200 when all goes well. Nothing prevents you to add a required string like, for example, &#8220;<code>session_data</code>&#8220;. This string is supposed to be in the response when all goes well:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: jscript; title: ; notranslate">
{
	&quot;authentication_data&quot;: {
		&quot;type&quot;: &quot;AUTH_DATA_TYPE_CREDENTIALS&quot;,
		&quot;data&quot;: {
			&quot;credentials&quot;: {}
		},
		&quot;authentication_attempt_identifier&quot;: {
			&quot;legacy_data&quot;: 0,
			&quot;data&quot;: &quot;AAAAnxKxXNAAAAAAAAAAAAdID0sK/1blLGtwrfs=&quot;
		}
	},
	&quot;session_data&quot;: {
		&quot;session_id&quot;: &quot;AAAAH7UQxz5P7BAAAAAAAAAmYTO+ctY+64otfz&quot;,
		&quot;account_name&quot;: &quot;ols1&quot;,
		&quot;access_rights&quot;: {
...
</pre></div>


<h2 class="wp-block-heading" id="h-logout">Logout</h2>



<p>The next step will be a Logout. The tricky part of this step is that it requires a specific header for the application to correlate the logout with the right user. This session id is in the body result of the login step. To extract it, we need to use a special tag in the value part (ie. <code>regex:</code>). This will look like:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="619" height="105" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-13_12_01-Configuration-of-web-monitoring-—-Mozilla-Firefox.png" alt="" class="wp-image-30601" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-13_12_01-Configuration-of-web-monitoring-—-Mozilla-Firefox.png 619w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-13_12_01-Configuration-of-web-monitoring-—-Mozilla-Firefox-300x51.png 300w" sizes="auto, (max-width: 619px) 100vw, 619px" /><figcaption class="wp-element-caption">Variables in Login step</figcaption></figure>



<p>After the Login step, {SID} variable will be populated with what the regex returns and can be reused in Headers section of Logout step:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="687" height="763" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-13_15_49-Configuration-of-web-monitoring-—-Mozilla-Firefox.png" alt="" class="wp-image-30602" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-13_15_49-Configuration-of-web-monitoring-—-Mozilla-Firefox.png 687w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-13_15_49-Configuration-of-web-monitoring-—-Mozilla-Firefox-270x300.png 270w" sizes="auto, (max-width: 687px) 100vw, 687px" /></figure>



<p>Note that I also set <code>{}</code> as raw data and 200 as required status code.</p>



<p>When the two steps are defined, the Steps tab of the scenario shows an overview:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="754" height="124" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-13_17_26-Configuration-of-web-monitoring-—-Mozilla-Firefox.png" alt="" class="wp-image-30604" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-13_17_26-Configuration-of-web-monitoring-—-Mozilla-Firefox.png 754w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-13_17_26-Configuration-of-web-monitoring-—-Mozilla-Firefox-300x49.png 300w" sizes="auto, (max-width: 754px) 100vw, 754px" /></figure>



<h2 class="wp-block-heading" id="h-resulting-data">Resulting Data</h2>



<p>Once the scenario is setup, it automatically creates a few items, along with a set of nice graphs. Items will be about:</p>



<ul class="wp-block-list">
<li>Download speed (per step)</li>



<li>Number of failed steps</li>



<li>Last error message</li>



<li>Response code (per step)</li>



<li>Response time (per step)</li>
</ul>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="300" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-13_23_11-Latest-data-—-Mozilla-Firefox-1024x300.png" alt="" class="wp-image-30605" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-13_23_11-Latest-data-—-Mozilla-Firefox-1024x300.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-13_23_11-Latest-data-—-Mozilla-Firefox-300x88.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-13_23_11-Latest-data-—-Mozilla-Firefox-768x225.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-13_23_11-Latest-data-—-Mozilla-Firefox.png 1121w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p>Based on these, we can create triggers to raise an alarm. For example, based on &#8220;<em>Failed step of scenario &#8220;Login/Logout&#8221;.</em>&#8221; item, we can imagine raising an alert as soon as there is a failed step with this expression:</p>



<pre class="wp-block-code"><code>last(/M-Files by Zabbix agent active/web.test.fail&#091;Login/Logout])&gt;0</code></pre>



<p>Additionally, graphics on download speed and response time with steps distinctions:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="419" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-13_30_41-Details-of-web-scenario-—-Mozilla-Firefox-1024x419.png" alt="" class="wp-image-30608" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-13_30_41-Details-of-web-scenario-—-Mozilla-Firefox-1024x419.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-13_30_41-Details-of-web-scenario-—-Mozilla-Firefox-300x123.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-13_30_41-Details-of-web-scenario-—-Mozilla-Firefox-768x314.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-13_30_41-Details-of-web-scenario-—-Mozilla-Firefox-1536x628.png 1536w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-30-13_30_41-Details-of-web-scenario-—-Mozilla-Firefox.png 1572w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></figure>



<p></p>
<p>L’article <a href="https://www.dbi-services.com/blog/zabbix-web-monitoring/">Zabbix Web Monitoring</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/zabbix-web-monitoring/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Improve your JMeter Load Testing?</title>
		<link>https://www.dbi-services.com/blog/how-to-do-improve-your-jmeter-load-testing/</link>
					<comments>https://www.dbi-services.com/blog/how-to-do-improve-your-jmeter-load-testing/#respond</comments>
		
		<dc:creator><![CDATA[Middleware Team]]></dc:creator>
		<pubDate>Mon, 29 Jan 2024 12:07:47 +0000</pubDate>
				<category><![CDATA[Application integration & Middleware]]></category>
		<category><![CDATA[JMeter]]></category>
		<category><![CDATA[LoadTest]]></category>
		<category><![CDATA[M-Files]]></category>
		<guid isPermaLink="false">https://www.dbi-services.com/blog/?p=30499</guid>

					<description><![CDATA[<p>In my previous blog post, I presented you how to create a load testing scenario based on a recorder. While working on it, I faced small problems that required few fixes which were very repetitive (and you know I love to automate as much as possible 🙂 ). Amount the issues I faced, there were: [&#8230;]</p>
<p>L’article <a href="https://www.dbi-services.com/blog/how-to-do-improve-your-jmeter-load-testing/">How to Improve your JMeter Load Testing?</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>In my <a href="https://www.dbi-services.com/blog/load-test-m-files-server-with-jmeter" target="_blank" rel="noreferrer noopener">previous blog post</a>, I presented you how to create a load testing scenario based on a recorder. While working on it, I faced small problems that required few fixes which were very repetitive (and you know I love to automate as much as possible <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /> ). Amount the issues I faced, there were:</p>



<ul class="wp-block-list">
<li>Extending a scenario with extra actions</li>



<li>Update a scenario as a new version of the application is behaving differently (different HTTP POST data and HTTP results)</li>
</ul>



<p>In this blog post, we will improve the existing load test scenario for <a href="https://www.m-files.com/" target="_blank" rel="noreferrer noopener">M-Files</a>.</p>



<h2 class="wp-block-heading" id="h-extend-a-scenario">Extend a Scenario</h2>



<p>When extending a scenario, the HTTP requests we will add will have different session ID (sid, M-Files-Session) and thus, we must find them and do a <em>Search and Replace</em> again. We must repeat this every time we add an HTTP request from a different recording. This might cause problems and waste of debugging time if not done properly.</p>



<p>A better approach would be to add a new type of object: A <mark class="has-inline-color has-light-green-cyan-color">JSR223 Preprocessor</mark>. This code will be called before (as &#8220;pre&#8221; indicates) each call of any type of object of the scenario. With this, we will be able to modify any HTTP request before it triggers.</p>



<p>If you recall my previous blog post, I discovered a client-side generated timestamp hash based on <a href="https://github.com/unshiftio/yeast" target="_blank" rel="noreferrer noopener">yeast</a> library:</p>



<figure class="wp-block-image size-large is-resized"><img loading="lazy" decoding="async" width="1024" height="611" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-26-22_17_56-Global-Scenario-2024-01.jmx-C__Users_ols_Documents_Technical_Load-Test_M-Files_-1024x611.png" alt="" class="wp-image-30505" style="width:550px" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-26-22_17_56-Global-Scenario-2024-01.jmx-C__Users_ols_Documents_Technical_Load-Test_M-Files_-1024x611.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-26-22_17_56-Global-Scenario-2024-01.jmx-C__Users_ols_Documents_Technical_Load-Test_M-Files_-300x179.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-26-22_17_56-Global-Scenario-2024-01.jmx-C__Users_ols_Documents_Technical_Load-Test_M-Files_-768x458.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-26-22_17_56-Global-Scenario-2024-01.jmx-C__Users_ols_Documents_Technical_Load-Test_M-Files_.png 1242w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">&#8220;<strong>t</strong>&#8221; parameters in POST</figcaption></figure>



<p>This is used sometimes in URL as GET parameters, sometimes in POST. We will first focus on GET.</p>



<h2 class="wp-block-heading" id="h-http-get">HTTP GET</h2>



<p>I will use a PreProcessor of type <a href="https://groovy-lang.org/" target="_blank" rel="noreferrer noopener">Apache Groovy</a> which is known to be more efficient than other languages supported by JMeter.</p>



<p>To avoid having the code run for all types of requests, my code will start with an if:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: groovy; title: ; notranslate">
if (sampler instanceof org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy) {
</pre></div>


<p>Next part of the code is to check if URL contains the &#8220;t&#8221; parameter with a regex and replace:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: groovy; title: ; notranslate">
    path = sampler.getPath();
	findRegex = /&amp;t=(.+)&amp;/;
	path = path.replaceFirst(findRegex, &quot;&amp;t=&quot; + newValue + &quot;&amp;&quot;);
    log.info(&quot;t variable updated to &quot; + newValue);
	sampler.setPath(path);
</pre></div>


<p>Now, whenever I run the scenario, we will see a line in the logviewer:</p>



<pre class="wp-block-code"><code>2024-01-29 09:45:55,722 INFO o.a.j.m.J.JSR223 PreProcessor Variable Updates: t variable updated to OrKPOIA.</code></pre>



<p>And that the triggered URL is different from how it was defined in the HTTP request:</p>



<figure class="wp-block-image size-large"><img loading="lazy" decoding="async" width="1024" height="205" src="http://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-29-09_59_59-Global-Scenario-2024-01.jmx-C__Users_ols_Documents_Technical_Load-Test_M-Files_-1024x205.png" alt="" class="wp-image-30516" srcset="https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-29-09_59_59-Global-Scenario-2024-01.jmx-C__Users_ols_Documents_Technical_Load-Test_M-Files_-1024x205.png 1024w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-29-09_59_59-Global-Scenario-2024-01.jmx-C__Users_ols_Documents_Technical_Load-Test_M-Files_-300x60.png 300w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-29-09_59_59-Global-Scenario-2024-01.jmx-C__Users_ols_Documents_Technical_Load-Test_M-Files_-768x153.png 768w, https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2024/01/2024-01-29-09_59_59-Global-Scenario-2024-01.jmx-C__Users_ols_Documents_Technical_Load-Test_M-Files_.png 1296w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /><figcaption class="wp-element-caption">&#8220;<strong>t</strong>&#8221; variable are different</figcaption></figure>



<p>On the left side, we see the &#8220;<strong>t</strong>&#8221; value at recording time. On the right, &#8220;<strong>t</strong>&#8221; value at scenario runtime.</p>



<p>This covers the case where &#8220;<strong>t</strong>&#8221; variable is in the URL. Next, we must do it for POST variables.</p>



<h2 class="wp-block-heading" id="h-http-post">HTTP POST</h2>



<p>For HTTP POST, we must proceed in the following order:</p>



<ol class="wp-block-list">
<li>Check HTTP Method is POST</li>



<li>Get arguments list</li>



<li>Check our argument is in the list</li>



<li>Remove it</li>



<li>Add it back with the correct value</li>
</ol>



<p>This gives the following groovy code:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: groovy; title: ; notranslate">
	if (sampler.getMethod() == &#039;POST&#039;) {
		arguments = sampler.getArguments().getArgumentsAsMap()
		if (arguments.containsKey(&quot;t&quot;)) {
			sampler.getArguments().removeArgument(&quot;t&quot;)
			sampler.addArgument(&quot;t&quot;,newValue)
			log.info(&quot;POST: t variable updated to &quot; + newValue);
		}
	}
</pre></div>


<h2 class="wp-block-heading" id="h-what-to-improve-even-more">What to Improve even More?</h2>



<p>I need to make this more generic via a method which I will be able to call for any variable as I have many other variables to consider for this M-Files scenario:</p>



<ul class="wp-block-list">
<li>SID</li>



<li>M-Files-Session</li>



<li>Vault ID</li>
</ul>



<p>Finally, for each of these, I will simply call the method:</p>


<div class="wp-block-syntaxhighlighter-code "><pre class="brush: groovy; title: ; notranslate">
updateVariables(&quot;t&quot;, newValue)
updateVariables(&quot;SID&quot;, vars.get(&quot;SID&quot;))
updateVariables(&quot;M-Files-Session&quot;, vars.get(&quot;SID-MFILES&quot;))
</pre></div><p>L’article <a href="https://www.dbi-services.com/blog/how-to-do-improve-your-jmeter-load-testing/">How to Improve your JMeter Load Testing?</a> est apparu en premier sur <a href="https://www.dbi-services.com/blog">dbi Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbi-services.com/blog/how-to-do-improve-your-jmeter-load-testing/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>

<!--
Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/?utm_source=w3tc&utm_medium=footer_comment&utm_campaign=free_plugin

Page Caching using Disk: Enhanced 
Lazy Loading (feed)

Served from: www.dbi-services.com @ 2026-05-28 01:11:52 by W3 Total Cache
-->