<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Muhammad Mustafa on Medium]]></title>
        <description><![CDATA[Stories by Muhammad Mustafa on Medium]]></description>
        <link>https://medium.com/@m.mustafa.d?source=rss-c49162b3fae5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*TmIXeWeD9AdFLHnTCuImcg.jpeg</url>
            <title>Stories by Muhammad Mustafa on Medium</title>
            <link>https://medium.com/@m.mustafa.d?source=rss-c49162b3fae5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 18:10:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@m.mustafa.d/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Real-time Dashboards: Prometheus, Grafana, and Oracle Database Exporter Unveiled!]]></title>
            <link>https://medium.com/@m.mustafa.d/real-time-dashboards-prometheus-grafana-and-oracle-database-exporter-unveiled-dd8cfc4ea545?source=rss-c49162b3fae5------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd8cfc4ea545</guid>
            <dc:creator><![CDATA[Muhammad Mustafa]]></dc:creator>
            <pubDate>Sat, 06 Jan 2024 18:31:41 GMT</pubDate>
            <atom:updated>2024-01-06T18:32:02.442Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Setting Up a New Machine for Grafana</strong></p><p><strong>Pre-requisites<br></strong>- Operating System: Linux (CentOS)<br>- Internet Connectivity for Package Installation<br>- Port connectivity from Local Machine to target installation machine<br>- SUDO access on targeted Linux machine<br>- Connectivity of Targeted machine and Database to be used</p><figure><img alt="Architecture for Grafana Prometheus Oracle Database Exporter" src="https://cdn-images-1.medium.com/max/1024/1*0rmqwXh7Oy1ICtQMDI_aiw.png" /><figcaption>Architecture for Grafana Prometheus Oracle Database Exporter</figcaption></figure><p><strong>Installation Steps</strong><br><strong>Grafana:</strong></p><pre>sudo yum install grafana<br>sudo systemctl start grafana-server<br>sudo systemctl enable grafana-server</pre><p>By default, Grafana runs on port <strong>3000</strong>. Open a web browser and navigate to <a href="http://your-server-ip:3000/"><strong>http://your-server-ip:3000</strong></a><br>The default username is admin, and the default password is also admin. You will be prompted to change the password upon the first login.</p><p><strong>Prometheus:</strong></p><pre>sudo yum install prometheus<br>sudo systemctl start prometheus<br>sudo systemctl enable prometheus</pre><p>Prometheus provides a web interface for querying and visualizing metrics. By default, it runs on port <strong>9090</strong>. Open a web browser and navigate to <a href="http://your-server-ip:9090/"><strong>http://your-server-ip:9090</strong></a><br>In case of any modifications in the configuration file of prometheus (<strong>prometheus.yml</strong>), prometheus can be restarted by:</p><pre>sudo systemctl reload prometheus</pre><p><strong>Oracle Database Exporter:</strong></p><p>Oracle Database Exporter can be downloaded from the following link:</p><p><a href="https://github.com/iamseth/oracledb_exporter">GitHub — iamseth/oracledb_exporter: Prometheus Oracle database exporter</a></p><p>Exporter is built on GO LANG, so GO LANG needs to installed by the following command:</p><pre>sudo yum install golang<br>go version</pre><p><strong>Configurations:</strong></p><p><strong>Grafana:</strong></p><p>Grafana needs to connect to Prometheus as a Data Source using the link below:</p><p><a href="http://localhost:3000/datasources">Data sources — Administration — Grafana</a></p><p>Search for Prometheus in the list and click on it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*bwAR6EXp2fnsQE1I5q8XCw.png" /><figcaption>Configuring Prometheus as a Datasource in Grafana</figcaption></figure><p>In the URL enter <a href="http://your-server-ip:9090/"><strong>http://your-server-ip:9090</strong></a>. Scroll down and click on “<strong>Save &amp; test</strong>”. It should return <strong>Data Source working</strong>. Now your Grafana can access data from Prometheus.</p><p><strong>Prometheus:</strong></p><p>Prometheus needs to get data from the Exporter, in order to do this navigate to the directory in your Targeted machine where Prometheus is installed. You will find a prometheus.YML file. Run the following command:</p><pre>vi prometheus.yml</pre><p>Once you open the file, copy the following code in the scrape_configs section:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*AYOeD1KGqvzmIemV2LLJIA.png" /><figcaption>Prometheus.yml configurations</figcaption></figure><p>Save this file and restart Prometheus. In order to verify the configurations go to the following link:</p><p><a href="http://your-server-ip:9090/"><strong>http://your-server-ip:9090</strong></a><br>In the upper menu click on <strong>Configurations</strong>-&gt;<strong>Targets</strong><br>Here you can now see a new Job named: “oracle-db-exporter”. Verify the IP and Port, it should match your Oracle DB Exporters IP and port (<strong>9161</strong>).</p><p><strong>Oracle Database Exporter:</strong></p><p>Once you have downloaded the exporter files. Navigate to this folder. Here you can see custom-metrics-example directory. In this directory open <strong>custom-metrics.toml </strong>file. This file contains all the queries that will be visualized on Grafana. Write the queries in the below format.</p><pre>[[metric]]<br>context = &quot;dashboard_queries&quot;<br>metricsdesc = { metrics_1 = “This metrics gives count of ids&quot; }<br>request = &quot;select count(id) your_table”</pre><p>In this format you can add as many queries as you require to be visualized on your Grafana Dashboard.</p><p>Now in order to create the build of the Oracle Database Exporter, run the below command:</p><pre>go build</pre><p>This will create an executable file which you can run to export data from database to port <strong>9161</strong>. Run the following command to run the exporter:</p><pre>export DATA_SOURCE_NAME=oracle://user:password@IP_address:port/service</pre><p>Replace the user, password, IP_address, port and service with the correct credentials of the database.</p><pre>./oracledb_exporter - custom.metrics custom-metrics.toml - query.timeout=10 - log.level error - web.listen-address :9161 &gt; exporter.log 2&gt;&amp;1 &amp;</pre><p>Now your exporter should be exporter metrics as per your queries to Prometheus which can be then visualized to Grafana.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd8cfc4ea545" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dive into the World of Data Alchemy: Turning Raw Data into Gold with Talend and CDC (Change Data…]]></title>
            <link>https://medium.com/@m.mustafa.d/dive-into-the-world-of-data-alchemy-turning-raw-data-into-gold-with-talend-and-cdc-change-data-4630a987ad26?source=rss-c49162b3fae5------2</link>
            <guid isPermaLink="false">https://medium.com/p/4630a987ad26</guid>
            <category><![CDATA[change-data-capture]]></category>
            <category><![CDATA[talend]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data-pipeline]]></category>
            <dc:creator><![CDATA[Muhammad Mustafa]]></dc:creator>
            <pubDate>Mon, 16 Oct 2023 18:15:28 GMT</pubDate>
            <atom:updated>2023-10-16T18:15:28.152Z</atom:updated>
            <content:encoded><![CDATA[<h3><em>Dive into the World of Data Alchemy: Turning Raw Data into Gold with Talend and CDC (Change Data Capture)!</em></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1T9w2AwAttH06F9b2GjZBA.png" /><figcaption>How CDC (Change Data Capture) works.</figcaption></figure><p><strong>Introduction:</strong></p><p>In the vast realm of data management and analytics, the efficiency of extracting, transforming, and loading (ETL) data is paramount. Enter Talend, a robust ETL tool that has been revolutionizing the way we handle data integration and transformation. In this article, we will embark on an insightful journey into the world of ETL using Talend, delving into the transformative power of Change Data Capture (CDC) techniques.</p><p><strong>Section 1: Understanding Talend and its ETL Prowess</strong></p><p><em>Talend</em>: A Powerhouse for Data Integration</p><p>Talend has emerged as a go-to tool for ETL processes due to its user-friendly interface and powerful capabilities. It facilitates seamless extraction of data from various sources, its transformation based on specific business requirements, and the efficient loading of the transformed data into the desired target.</p><p><strong>Section 2: Decoding Change Data Capture (CDC)</strong></p><p><em>Unlocking Real-Time Insights with Change Data Capture</em></p><p>Change Data Capture (CDC) is a game-changer in the ETL landscape. It allows us to identify and capture changes made to the source data, enabling real-time analysis and decision-making. One of the CDC techniques we’ll explore is the “Log-based CDC,” a method that detects and captures changes by analyzing the database logs, ensuring a more precise and efficient ETL process.</p><p><strong>Section 3: Implementing Change Data Capture with Talend</strong></p><p><em>How to Leverage CDC in Talend for Enhanced ETL</em></p><p>In this section, we’ll delve into implementing Change Data Capture using Talend. We’ll explore the steps involved, including configuring the CDC components, defining the source and target, and creating the CDC job. By the end, you’ll have a clear understanding of how to integrate this powerful technique into your ETL workflows.</p><p><strong>Conclusion: Mastering ETL with Talend and CDC</strong></p><p><em>Empowering Data Transformation for a Brighter Future</em></p><p>With the dynamic capabilities of Talend and the transformative magic of Change Data Capture, the world of ETL has never been more promising. As we continue to navigate the data landscape, mastering these technologies will undoubtedly unlock new realms of efficiency, accuracy, and real-time insights. So, let’s embrace this journey, armed with the power of ETL and the magic of CDC.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4630a987ad26" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Boost Your Data Analysis: A Guide to Effective Data Cleaning with Python]]></title>
            <link>https://medium.com/@m.mustafa.d/how-to-boost-your-data-analysis-a-guide-to-effective-data-cleaning-with-python-a54e0e256571?source=rss-c49162b3fae5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a54e0e256571</guid>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-cleaning-with-python]]></category>
            <category><![CDATA[data-cleaning]]></category>
            <category><![CDATA[dataframes]]></category>
            <dc:creator><![CDATA[Muhammad Mustafa]]></dc:creator>
            <pubDate>Sat, 29 Jul 2023 11:04:17 GMT</pubDate>
            <atom:updated>2023-07-29T11:04:17.851Z</atom:updated>
            <content:encoded><![CDATA[<p>In the era of big data, businesses and researchers are inundated with massive volumes of information. However, this data is often far from perfect and requires a substantial amount of preparation before it can be used for analysis. Data cleaning, also known as data cleansing or scrubbing, is identifying and correcting errors, inconsistencies, and inaccuracies in datasets to ensure data quality. Python, with its rich ecosystem of libraries, offers powerful tools to efficiently clean and prepare data for analysis. In this article, we will explore various techniques and Python libraries that can help you tidy up your data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0P4jk7QM005D4OskqmdTXQ.gif" /></figure><h3>Why is Data Cleaning Important?</h3><p>Data cleaning is a critical step in the data analysis pipeline. Here are some key reasons why data cleaning is essential:</p><ol><li>Accuracy: Clean data ensures that the insights and conclusions drawn from the data are accurate and reliable. Garbage in, garbage out — if the data is flawed, any analysis performed on it will be flawed as well.</li><li>Consistency: Consistent data allows for better integration of datasets from various sources. It ensures that the data adheres to a unified format, making it easier to combine and compare different datasets.</li><li>Decision Making: Clean data empowers businesses and researchers to make informed decisions. Data-driven decisions are only as good as the data they are based on.</li><li>Reduced Bias: Data cleaning helps in removing biases introduced due to errors or inconsistencies in the data, leading to fairer and more accurate results.</li></ol><h3>Common Data Cleaning Techniques</h3><p>Let’s delve into some common data cleaning techniques that can be applied using Python:</p><h3>1. Removing Duplicate Records</h3><p>Duplicate records can skew analysis results and lead to incorrect conclusions. Python’s Pandas library provides robust functionality to detect and remove duplicates, ensuring your dataset remains unique and accurate.</p><pre>import pandas as pd<br><br># Assuming &#39;df&#39; is your DataFrame<br>df = df.drop_duplicates()</pre><h3>2. Handling Missing Values</h3><p>Missing data is a common challenge in datasets. Python offers several methods to deal with missing values, such as filling them with the mean, median, or mode of the column or using more advanced techniques like interpolation.</p><pre># Filling missing values with the mean<br>df[&#39;column_name&#39;].fillna(df[&#39;column_name&#39;].mean(), inplace=True)<br><br># Using interpolation for time series data<br>df[&#39;column_name&#39;] = df[&#39;column_name&#39;].interpolate(method=&#39;linear&#39;)</pre><h3>3. Data Formatting</h3><p>Inconsistent data formatting can create hurdles during analysis. Python enables you to convert data to the appropriate formats, such as dates, numerical values, or categorical variables.</p><pre># Converting a column to datetime format<br>df[&#39;date_column&#39;] = pd.to_datetime(df[&#39;date_column&#39;])<br><br># Converting a column to numeric format<br>df[&#39;numeric_column&#39;] = pd.to_numeric(df[&#39;numeric_column&#39;])</pre><h3>4. Removing Outliers</h3><p>Outliers can significantly impact statistical analysis and model performance. Python libraries like NumPy and Pandas can help you identify and remove outliers from your dataset.</p><pre>import numpy as np<br><br># Removing outliers using z-score<br>z_scores = np.abs((df[&#39;column&#39;] - df[&#39;column&#39;].mean()) / df[&#39;column&#39;].std())<br>df = df[z_scores &lt; 3]  # Keeping only data within 3 standard deviations from the mean</pre><h3>5. Standardizing and Scaling</h3><p>Standardizing and scaling data are essential when features have different units or scales. Python’s Scikit-learn library provides utilities to easily perform these transformations.</p><pre>from sklearn.preprocessing import StandardScaler<br><br>scaler = StandardScaler()<br>df[[&#39;feature1&#39;, &#39;feature2&#39;]] = scaler.fit_transform(df[[&#39;feature1&#39;, &#39;feature2&#39;]])</pre><h3>Conclusion</h3><p>Data cleaning is a fundamental step in the data analysis process, ensuring the data you use is accurate, consistent, and reliable. Python, with its powerful libraries like Pandas, NumPy, and Scikit-learn, offers a vast array of tools to clean and preprocess data efficiently. By employing the right techniques, you can transform messy and raw data into a clean and structured format, enabling you to draw meaningful insights and make well-informed decisions. Remember, the quality of your analysis depends on the quality of your data, and data cleaning is the bridge that takes you from raw data to valuable insights. So, embrace the power of Python and embark on your data cleaning journey today!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a54e0e256571" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dive into Real-time Dashboards: Prometheus, Grafana, and SQL Exporter Unveiled!]]></title>
            <link>https://blog.devops.dev/dive-into-real-time-dashboards-prometheus-grafana-and-sql-exporter-unveiled-e28731c0b879?source=rss-c49162b3fae5------2</link>
            <guid isPermaLink="false">https://medium.com/p/e28731c0b879</guid>
            <category><![CDATA[monitoring]]></category>
            <category><![CDATA[prometheus]]></category>
            <category><![CDATA[grafana]]></category>
            <category><![CDATA[sql-server]]></category>
            <category><![CDATA[dashboard]]></category>
            <dc:creator><![CDATA[Muhammad Mustafa]]></dc:creator>
            <pubDate>Sun, 09 Jul 2023 10:04:46 GMT</pubDate>
            <atom:updated>2023-07-12T12:37:48.074Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s data-driven world, businesses are constantly seeking innovative ways to extract valuable insights from their vast amounts of data. From website performance to database monitoring, having real-time visibility into key metrics is crucial for making informed decisions and ensuring optimal performance. In this article, we delve into the fascinating realm of <a href="https://prometheus.io/">Prometheus</a>, <a href="https://grafana.com/">Grafana</a>, and <a href="https://github.com/free/sql_exporter">SQL Exporter</a>, a powerful trio that empowers you to unlock the true potential of data visualization. So fasten your seatbelts as we embark on a journey to transform raw data into captivating visualizations that unveil hidden patterns and drive actionable intelligence. Let’s dive in!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*78JqhDg42JuiJXnzNdhqVw.png" /><figcaption>Tech Stack</figcaption></figure><p><strong>Installing and Configuring Prometheus:</strong></p><ul><li>Download the latest stable release of Prometheus from the official <a href="https://prometheus.io/">Prometheus</a> website.</li><li>Extract the downloaded archive using the appropriate command for your Linux distribution.</li></ul><pre>tar -xzf prometheus-x.x.x.linux-amd64.tar.gz</pre><ul><li>Navigate to the extracted Prometheus directory.</li><li>Review the default configuration file (prometheus.yml). In case of using SQL exporter change your scrape configs to the following:</li></ul><pre>scrape_configs:<br>  # The job name is added as a label `job=&lt;job_name&gt;` to any timeseries scraped from this config.<br>  - job_name: &quot;prometheus&quot;<br><br>    # metrics_path defaults to &#39;/metrics&#39;<br>    # scheme defaults to &#39;http&#39;.<br><br>    static_configs:<br>      - targets: [&quot;localhost:9399&quot;] #port set to sql_exporter metrics</pre><ul><li>Start Prometheus by executing the ./prometheus command.</li><li>Verify that Prometheus is running by accessing the Prometheus web interface through your server’s IP address or domain name, followed by default Prometheus port 9090 (e.g., <a href="http://your-server-ip:9090).">http://your-server-ip:9090).</a></li><li>Explore the Prometheus web interface and familiarize yourself with its <a href="https://prometheus.io/docs/prometheus/latest/querying/basics/">PromQL </a>querying and visualization capabilities.</li></ul><p><strong>Installing and Configuring Grafana:</strong></p><ul><li>Download the Grafana repository GPG key:</li></ul><pre>wget -q -O - https://packages.grafana.com/gpg.key | sudo apt-key add -</pre><ul><li>Add the Grafana repository:</li></ul><pre>sudo add-apt-repository &quot;deb https://packages.grafana.com/oss/deb stable main&quot;</pre><ul><li>Update the package repository again:</li></ul><pre>sudo apt update</pre><ul><li>Install and start the Grafana service:</li></ul><pre>sudo apt install grafana<br>sudo systemctl start grafana-server</pre><ul><li>Enable the Grafana service to start on boot:</li></ul><pre>sudo systemctl enable grafana-server</pre><ul><li>Access Grafana through a web browser by entering your server’s IP address or domain name followed by port 3000 (e.g., <a href="http://your_server_ip:3000).">http://your_server_ip:3000).</a></li><li>Set up an admin user by providing a username and password.</li><li>Navigate to Home → Connections → Connect Data and choose Prometheus as your data source.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hdnOH5Qkk1ozEDNa5fGPjw.png" /><figcaption>connecting Prometheus as data source to Grafana</figcaption></figure><ul><li>Add your Prometheus IP address followed by its default port 9090.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F8SNd7O2knINV0dXKM2-oA.png" /><figcaption>Prometheus as</figcaption></figure><p><strong>Installing and configuring SQL Exporter:</strong></p><ul><li>Download the SQL Exporter package by executing the following command in your terminal:</li></ul><pre>wget https://github.com/free/sql_exporter/releases/download/0.5/sql_exporter-0.5.linux-386.tar.gz</pre><ul><li>Extract the downloaded package using the following command:</li></ul><pre>tar -xf sql_exporter-0.5.linux-386.tar.gz</pre><p>Once extracted, open the sql_exporter.ymlfile</p><ul><li>Add your database credentials in the targets section:</li></ul><pre>target:<br>  data_source_name: &#39;sqlserver://prom_user:prom_password@dbserver1.example.com:1433&#39;</pre><ul><li>Open your collector.yml file and add the database queries for the data that you wish to pull from your database.</li></ul><pre>  - metric_name: mynewmetrics<br>    type: counter<br>    help: &#39;What this metrics show&#39;<br>    values: [count] #type of values<br>    #enter your query in the section below<br>    query: |<br>      SELECT COUNT<br>        (id) AS count<br>      FROM<br>        mytable   </pre><ul><li>Run the exporter using ./sql_exporter</li><li>This will start the SQL Exporter and it will listen on the default port 9399.</li><li>You can now view your pulled metrics at localhost:9399/metrics</li></ul><p><strong>Note</strong>: Make sure to check the official documentation of <a href="https://github.com/free/sql_exporter">SQL Exporter</a> for any additional configuration or customization options specific to your database setup.</p><p><strong>Dashboards in Grafana</strong></p><ul><li>Click on the “Create” button in the left sidebar and select “Dashboard” to create a new dashboard.</li><li>Choose the desired visualization panel from the available options (e.g., Graph, chart, Table, etc.) and click on it to add it to the dashboard.</li><li>Configure the panel by selecting the data source, defining queries, and customizing the visualization settings such as time range, legends, axes, and thresholds.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*izK3UdeILUVwDXX9LLhy7w.png" /><figcaption>Grafana dashboard configuration</figcaption></figure><ul><li>Add additional panels by repeating the previous steps or duplicating existing panels.</li></ul><p>Leveraging the powerful combination of Prometheus, Grafana, and SQL Exporter provides us with real-time insights into the performance and health of our systems. With Prometheus collecting and storing metrics, Grafana allows us to create stunning visualizations and dashboards, while SQL Exporter enables us to monitor and query our SQL databases effortlessly.</p><p>By following the installation and setup steps outlined in this article, you can unlock the full potential of these tools and gain valuable insights into your applications and infrastructure. Embrace the world of real-time monitoring and analytics with Prometheus, Grafana, and SQL Exporter, and take control of your data-driven decision-making process.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e28731c0b879" width="1" height="1" alt=""><hr><p><a href="https://blog.devops.dev/dive-into-real-time-dashboards-prometheus-grafana-and-sql-exporter-unveiled-e28731c0b879">Dive into Real-time Dashboards: Prometheus, Grafana, and SQL Exporter Unveiled!</a> was originally published in <a href="https://blog.devops.dev/">DevOps.dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>