<?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 Jnanesh Shetty A on Medium]]></title>
        <description><![CDATA[Stories by Jnanesh Shetty A on Medium]]></description>
        <link>https://medium.com/@jnanesh55?source=rss-3ddc2c5f565b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*VTZ419VGEYa_kR8q</url>
            <title>Stories by Jnanesh Shetty A on Medium</title>
            <link>https://medium.com/@jnanesh55?source=rss-3ddc2c5f565b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 09:59:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jnanesh55/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[Automating Issue Management: Integrating Zabbix Alerts with Redmine]]></title>
            <link>https://medium.com/@jnanesh55/automating-issue-management-integrating-zabbix-alerts-with-redmine-e55800ff9bb4?source=rss-3ddc2c5f565b------2</link>
            <guid isPermaLink="false">https://medium.com/p/e55800ff9bb4</guid>
            <dc:creator><![CDATA[Jnanesh Shetty A]]></dc:creator>
            <pubDate>Fri, 28 Jun 2024 05:42:22 GMT</pubDate>
            <atom:updated>2024-06-28T13:11:19.482Z</atom:updated>
            <content:encoded><![CDATA[<p>In DevOps, efficient issue tracking and alert management are essential for maintaining system reliability and performance. Integrating Zabbix, a powerful monitoring solution, with Redmine, a versatile project management and issue tracking tool, can significantly enhance your incident management workflow. This guide walks you through setting up an integration between Zabbix and Redmine to automatically create and close issues based on Zabbix alerts.</p><p>Recently, I worked on a task that involved integrating Zabbix with Redmine. Drawing from that experience, I decided to write this article. Given the limited resources available on this topic, I hope it will be helpful to others.</p><h3>Introduction</h3><p>Zabbix provides real-time monitoring, alerting, and data visualisation for your infrastructure, while Redmine offers robust issue tracking and project management capabilities. By integrating these two tools, you can ensure that critical alerts from Zabbix automatically create corresponding issues in Redmine, and once resolved, these issues are automatically closed. This integration streamlines the process of incident management, reducing manual effort and the potential for oversight.</p><h3>Prerequisites</h3><p>Before you start, ensure you have:</p><ol><li><strong>Zabbix </strong>installed and configured(I used Zabbix Version 6).</li><li><strong>Redmine</strong> installed and configured.</li><li>Administrative access to both Zabbix and Redmine.</li><li>A basic understanding of Python for script customisation.</li></ol><h3>Step-by-Step Integration</h3><h4>Step 1: Setting Up the Environment</h4><ol><li><strong>Install Required Packages:</strong> Ensure Python and required packages are installed on the server where Zabbix is running.</li></ol><pre>sudo apt-get update<br>sudo apt-get install python3 python3-pip<br>pip3 install requests sqlite3  </pre><p><strong>2. Create a SQLite Database:</strong> Set up a SQLite database to store the mapping between Zabbix alerts and Redmine issues.</p><pre>sqlite3 /home/ubuntu/redmine_database.db &quot;CREATE TABLE issue_tracking (alert_id TE<br>XT PRIMARY KEY, issue_id INTEGER, status TEXT);&quot;  </pre><h4>Step 2: Configuring Zabbix</h4><ol><li>Configuring Zabbix for Alerting:</li></ol><p><strong>Create Media Type for Script Execution</strong>:</p><ul><li>Go to <strong>Administration &gt; Media types</strong>.</li><li>Click <strong>Create media type</strong>.</li><li>Set <strong>Type</strong> to <strong>Script</strong>.</li><li>Name it create_issue. {You can name it as per your convenient}</li><li>Set the script name to create_issue.py.</li><li>Script parameters are based on your script. Will discuss parameters in the next section.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TnDy8lr-UIcl_XyU" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*jhCpwQflxLv_c4j3" /></figure><p><strong>Create Media Type for Recovery Alerts</strong>:</p><ul><li>Follow similar steps to create a media type named close_issue</li><li>Set the script name to close_issue.py.</li></ul><p><strong>Create Action for Problem Alerts</strong>:</p><ul><li>Go to Configuration -&gt; Actions.</li><li>Click Create action.</li><li>Set Name to Create action.</li><li>Set Event source to Trigger.</li><li>In Operations, add a new operation:</li></ul><p>Operation type: Send message<br> Send to Users: Select the user.<br> Send only to: create_issue. {Media type that we created earlier}</p><ul><li>One more Operation for recover operation:</li></ul><p>Operation type: Send message<br>Send to Users: Select the user. <br>Send only to: close_issue. {Media type that we created earlier}</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*etNRW8LEMrkA54BN" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eqZIfrP5URzsnMne" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*u7axfGqXrrE-kZSd" /></figure><h3>Step 3: Setting Up Redmine</h3><ol><li>Install Redmine on the designated server.</li><li>Configure Redmine with required projects and trackers.</li></ol><p>Creating Redmine API Key:</p><ol><li>Log in to Redmine as an admin.</li><li>Go to My account -&gt; API access key.</li><li>Generate and copy the API key.</li></ol><h3><strong>Step 4: Code</strong></h3><p>Git: <a href="https://github.com/jnanesh-byte/zabbix_Redmine_Integration.git">https://github.com/jnanesh-byte/zabbix_Redmine_Integration.git</a></p><p>There are two python scripts, create_issue.py and close_issue.py <br>create_issue.py requires parameters {TRIGGER.ID} {ALERT.SUBJECT} and {ALERT.MESSAGE} and close_issue.py requires {TRIGGER.ID} these parameter comes from zabbix media type.</p><p>Note: I had faced issue to get trigger id, so i extracted it from {ALERT.MESSAGE}</p><p>Clone the repo and place the scripts in the path - /usr/lib/zabbix/alertscripts/</p><p>Change the permission of the scripts to exceutable.</p><h3>Step 5: Detailed Workflow</h3><p><strong>Issue Creation:</strong></p><ol><li>Zabbix triggers an alert.</li><li>The create_issue.py script is executed.</li><li>The script extracts the event ID from the alert message.</li><li>An issue is created in Redmine.</li><li>The event ID and issue ID are stored in the SQLite database.</li></ol><p><strong>Issue Closure</strong></p><ol><li>Zabbix resolves the alert.</li><li>The close_issue.py script is executed.</li><li>The script retrieves open issues from the database.</li><li>The corresponding issue in Redmine is closed.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lmdZLP41zvN5qjrvJ0k5MA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kW95YSwvmf8EZLZVkboE3w.png" /></figure><p>By integrating Zabbix and Redmine, you can automate the handling of multiple alerts and issues, making your DevOps processes more efficient and reliable. This setup ensures that critical events are tracked and managed effectively, allowing your team to focus on resolving issues promptly.</p><p>Happy Monitoring ;)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e55800ff9bb4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Strengthening Server Security with Fail2ban]]></title>
            <link>https://medium.com/@jnanesh55/strengthening-server-security-with-fail2ban-09fdebf073f6?source=rss-3ddc2c5f565b------2</link>
            <guid isPermaLink="false">https://medium.com/p/09fdebf073f6</guid>
            <dc:creator><![CDATA[Jnanesh Shetty A]]></dc:creator>
            <pubDate>Wed, 20 Mar 2024 15:29:22 GMT</pubDate>
            <atom:updated>2024-03-20T15:29:22.615Z</atom:updated>
            <content:encoded><![CDATA[<h4>Introduction:</h4><p>In today’s digital landscape, securing servers against unauthorized access and malicious attacks is paramount for any organization. Fail2ban is a powerful tool in the arsenal of system administrators for enhancing server security. By monitoring log files and automatically blocking IP addresses exhibiting suspicious behavior, Fail2ban fortifies servers against a variety of threats, including brute-force attacks and malicious bots. This article serves as a comprehensive guide for system administrators looking to implement Fail2ban effectively.</p><p>Understanding Fail2ban: Fail2ban is an open-source intrusion prevention framework designed to protect servers from brute-force attacks. It operates by continuously monitoring log files for specified patterns indicative of malicious activity, such as repeated failed login attempts. Once a certain threshold is reached, Fail2ban takes action by dynamically updating firewall rules to block the offending IP address, preventing further access attempts.</p><h4>Key Features and Benefits:</h4><ol><li>Flexible Configuration: Fail2ban allows administrators to define custom filters and rules tailored to their specific security requirements. This flexibility ensures that the tool can adapt to diverse server environments and effectively mitigate emerging threats.</li><li>Centralized Logging: By consolidating log data from various services and applications, Fail2ban provides administrators with a centralized view of security events, simplifying monitoring and analysis.</li><li>Automated Response: Fail2ban automates the process of identifying and blocking malicious actors, reducing the burden on administrators and minimizing response times to security incidents.</li><li>Scalability: Whether managing a single server or a distributed network infrastructure, Fail2ban scales seamlessly to protect systems of any size, making it suitable for organizations of all types.</li></ol><h4>Installation and Configuration:</h4><ol><li>Installation: Fail2ban is typically available in the package repositories of popular Linux distributions. Administrators can install it using package managers such as apt (for Debian/Ubuntu) or yum (for CentOS/RHEL).</li><li>Configuration: After installation, administrators must configure Fail2ban to monitor the desired log files and define appropriate filters for detecting suspicious activity. Configuration files are typically located in the /etc/fail2ban directory and can be edited using a text editor.</li></ol><h4>Best Practices for Effective Deployment:</h4><ol><li>Regular Updates: To ensure optimal protection, administrators should keep Fail2ban updated with the latest security patches and enhancements.</li><li>Fine-Tuning Filters: Continuously refine Fail2ban’s filters and rules based on evolving security threats and server activity patterns. Regularly review logs to identify new attack vectors and adjust configurations accordingly.</li><li>Monitoring and Alerting: Implement monitoring and alerting mechanisms to notify administrators of significant security events detected by Fail2ban. This enables proactive response to potential threats and helps maintain the integrity of server environments.</li><li>Integration with Security Frameworks: Integrate Fail2ban with other security frameworks and tools, such as intrusion detection systems (IDS) and security information and event management (SIEM) platforms, to enhance overall security posture and streamline incident response workflows.</li></ol><p>Fail2ban is a valuable tool for system administrators seeking to bolster server security and protect against a wide range of cyber threats. By leveraging its automated monitoring and response capabilities, organizations can significantly reduce the risk of unauthorized access and data breaches. With careful configuration and adherence to best practices, Fail2ban serves as an essential component of a comprehensive security strategy, safeguarding critical assets and preserving the integrity of server environments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=09fdebf073f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with Apigee: A Beginner’s Guide for DevOps Engineers]]></title>
            <link>https://medium.com/@jnanesh55/getting-started-with-apigee-a-beginners-guide-for-devops-engineers-46afb78aa24d?source=rss-3ddc2c5f565b------2</link>
            <guid isPermaLink="false">https://medium.com/p/46afb78aa24d</guid>
            <dc:creator><![CDATA[Jnanesh Shetty A]]></dc:creator>
            <pubDate>Mon, 04 Mar 2024 04:17:49 GMT</pubDate>
            <atom:updated>2024-03-04T04:17:49.818Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction:</strong></p><p>In the dynamic realm of software development, APIs have evolved into the essential framework supporting modern applications. Apigee, a robust API management platform, streamlines the intricacies of API design, deployment, and management. For DevOps engineers, gaining a foundational understanding of Apigee can greatly empower their capacity to optimise and simplify API workflows.It’s important to note that Apigee is not an open-source platform, it operates under a licensing model, requiring users to pay for its usage.</p><p>Apigee, initially established as Sonoa Systems in 2004, underwent a rebranding in 2010 to become APIGEE. In a significant move, Google acquired APIGEE in 2016, solidifying its presence in the API management landscape.</p><p><strong>Features</strong>:</p><p><strong>API Security:</strong> Apigee ensures robust API security through support for two-way SSL/TLS, API key validation, OAuth1, OAuth2, SAML, basic Auth, CORS, and other advanced authentication and authorisation mechanisms.</p><p><strong>API Traffic Management:</strong> Efficiently manage API traffic with Apigee’s features such as Quota Management, Rate Limiting, and Spike Arrest Policies. These capabilities help optimise performance and ensure a reliable API experience.</p><p><strong>Configuration Store:</strong> Apigee offers a flexible and secure configuration store, providing a centralised and adaptable way to manage your configurations. This ensures easy maintenance and updates to support changing requirements.</p><p><strong>API Analytics:</strong> Gain comprehensive insights into API performance with Apigee’s analytics tools. Monitor fine-grained performance metrics, generate reports, and visualise usage metrics related to applications, developers, and APIs for informed decision-making.</p><p><strong>Data Transformation:</strong> Apigee facilitates seamless data transformation between various formats, including REST, XML, Binary, or custom formats.</p><p><strong>Developer Portal:</strong> Apigee comes with an out-of-the-box developer portal that is highly customisable. This portal serves as a central hub for developers, providing them with the resources and documentation needed to interact with your APIs effectively.</p><p><strong>Management APIs:</strong> Apigee empowers users with a set of management APIs to efficiently handle various resources within the API proxy. This includes managing caches, deploying proxies, and overseeing deployments, offering granular control over the API development and deployment lifecycle.</p><h4><strong>Policies:</strong></h4><p>Policies are the building blocks that empower DevOps engineers to shape and control the behavior of API traffic within the Apigee platform. They offer a wide range of functionalities, spanning from security measures to traffic management and data transformation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/510/1*11Bsb9mikhk1_Dj54yB6Dw.png" /><figcaption><strong>Policies</strong></figcaption></figure><p><strong>Policies in Apigee:</strong></p><ol><li>Security Policies</li><li>Traffic Management Policies</li><li>Transformation Policies</li><li>Traffic Flow Control Policies</li><li>Caching Policies</li><li>Extension and Integration Policies</li><li>Monitoring and Analytics Policies</li><li>Security and Threat Protection Policies</li></ol><h3>API Proxy Flow Components:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OSxx2KM5nv3g-MKyp1QXcg.png" /><figcaption>API Proxy Flow</figcaption></figure><blockquote><strong>Flow execution sequence:</strong></blockquote><blockquote>When determining where to incorporate logic, the initial decision is whether to include it in a proxy endpoint or target endpoint. An API proxy partitions its code into segments that interact with the client (proxy endpoint) and, if applicable, segments that interact with the backend target (target endpoint).</blockquote><blockquote>Each endpoint includes the following flows:</blockquote><blockquote><strong>ProxyEndpoint:</strong></blockquote><blockquote>Description: Contains API proxy flows closest to the client, allowing logic to operate first on the client’s request and last on the response to the client.</blockquote><blockquote>Supported Flows: PreFlow, conditional flows, PostFlow, PostClientFlow</blockquote><blockquote><strong>TargetEndpoint:</strong></blockquote><blockquote>Description: Encompasses API proxy flows closest to the backend resource, offering places for logic to prepare a request for and handle the response from a backend resource.</blockquote><blockquote>Supported Flows: PreFlow, conditional flows, PostFlow</blockquote><h4>1. PreFlow:</h4><ul><li>Description: The PreFlow is essential for executing specific code before any other processing occurs. It is particularly useful for tasks that need to happen at the very beginning of the API request flow.</li><li>Execution Context: In a proxy endpoint, the PreFlow executes before the main request flow. In a target endpoint, it executes after the proxy endpoint’s PostFlow.</li><li>Use Cases: Authentication and authorisation checks. Initialisation tasks before processing the main request.</li></ul><h4>2. Conditional Flow:</h4><ul><li>Description: The Conditional Flow is designed for implementing conditional logic based on specific criteria. It executes after the PreFlow and before the PostFlow. Only one conditional flow is executed per segment, based on the first true condition.</li><li>Execution Context:</li><li>Applies to both proxy and target endpoints.</li><li>Executes after the PreFlow and before the PostFlow in the request and response pipelines of both proxy and target endpoints.</li><li>Use Cases: Dynamic routing of requests based on specific conditions. Customised processing based on request or response attributes.</li></ul><h4>3. PostFlow:</h4><ul><li>Description: The PostFlow is a suitable place for actions that need to occur after conditional flows and PreFlow. It&#39;s commonly used for logging data, sending notifications, or performing cleanup tasks.</li><li>Execution Context:</li><li>In a proxy endpoint with a target endpoint, the proxy endpoint PostFlow executes before the target endpoint PreFlow.</li><li>Use Cases: Logging analytics data, Sending notifications about request processing. Cleanup tasks after request processing.</li></ul><h4>4. PostClientFlow (Proxy Flow Only):</h4><ul><li>Description: The PostClientFlow is a specific flow available only in proxy endpoints. It is executed after the response is returned to the client, making it suitable for logging messages and performing actions related to the client response.</li><li>Execution Context: Applies exclusively to proxy endpoints.</li><li>Use Cases: Logging messages related to the response sent to the client. Additional processing or notifications after the client receives the response.</li></ul><h4><strong>Application of Policies:</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jzs9O8bFN84qH3zeonNOEw.png" /><figcaption>Attaching a policy to a flow</figcaption></figure><ol><li><strong>Request Flow</strong>:</li></ol><ul><li>Policies in the request flow are applied as the API request enters the proxy endpoint.</li><li>DevOps engineers can enforce security measures, control traffic, and transform data to meet API requirements.</li></ul><p>2. <strong>Response Flow:</strong></p><ul><li>Policies in the response flow are applied after the API request has been processed, just before sending the response to the client.</li><li>We can handle error scenarios, transform response data, and manage caching at this stage.</li></ul><p><strong>3. Conditional Flows:</strong></p><ul><li>Conditional flows direct requests based on specific criteria, allowing for dynamic routing within the API proxy.</li><li>We can use conditional flows to tailor the flow of API traffic based on various conditions.</li></ul><p><strong>4. Preflow and Post Flow:</strong></p><ul><li>Preflow and post flow phases occur before the main request flow and after the response flow, respectively.</li><li>Policies applied in these phases allow for actions such as authentication, logging, and cleanup.</li></ul><p>Understanding the diverse range of policies available in Apigee empowers DevOps engineers to tailor API proxies to meet specific functional and non-functional requirements. As a result, Apigee becomes a flexible and powerful tool for managing and optimizing API workflows.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46afb78aa24d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>