{"id":11306,"date":"2024-02-12T13:42:33","date_gmt":"2024-02-12T08:12:33","guid":{"rendered":"https:\/\/www.skynats.com\/?p=11306"},"modified":"2025-03-24T13:05:48","modified_gmt":"2025-03-24T07:35:48","slug":"log-monitoring-grafana-loki-installation","status":"publish","type":"post","link":"https:\/\/www.skynats.com\/blog\/log-monitoring-grafana-loki-installation\/","title":{"rendered":"Log Monitoring | Grafana Loki Installation"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"11306\" class=\"elementor elementor-11306\" data-elementor-post-type=\"post\">\n\t\t\t\t<div class=\"has_eae_slider elementor-element elementor-element-322fac90 e-flex e-con-boxed e-con e-parent\" data-eae-slider=\"7451\" data-id=\"322fac90\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-60c18d47 elementor-widget elementor-widget-text-editor\" data-id=\"60c18d47\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\n<figure class=\"wp-block-image size-medium\"><img fetchpriority=\"high\" decoding=\"async\" width=\"300\" height=\"177\" sizes=\"(max-width: 300px) 100vw, 300px\" class=\"wp-image-11308\" src=\"https:\/\/www.skynats.com\/wp-content\/uploads\/2024\/02\/Grafana-Loki-300x177.png\" alt=\"Grafana Loki\" srcset=\"https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/02\/Grafana-Loki-300x177.png 300w, https:\/\/www.skynats.com\/blog\/wp-content\/uploads\/2024\/02\/Grafana-Loki.png 538w\" \/><\/figure>\n\n<p class=\"wp-block-paragraph\">Grafana Loki is a log aggregation system, inspired by Prometheus, designed for easy setup and scalability. It offers an affordable solution for collecting, storing, and querying vast amounts of log data. As part of the <a href=\"https:\/\/grafana.com\/\" target=\"_blank\" rel=\"noopener\">Grafana<\/a> Labs ecosystem, Grafana Loki is open-source and widely adopted. For users looking to implement it, Grafana Loki installation is straightforward and can be done efficiently to manage large-scale log data.<\/p>\n\n<p class=\"wp-block-paragraph\">Skynats, as a part of our <a href=\"https:\/\/www.skynats.com\/server-management\/\"><mark class=\"has-inline-color has-accent-color\" style=\"background-color: rgba(0, 0, 0, 0);\">Server Management Service<\/mark><\/a>, is using Grafana Loki services to monitor server logs and identify the issues with no time.<\/p>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Main Advantages of Loki<\/strong><\/p>\n<cite>Here are 3 major advantages of Loki<\/cite><\/blockquote>\n\n<ul class=\"wp-block-list\">\n<li><strong>Log Aggregation:<\/strong> Loki enables you to consolidate logs from numerous sources into a single system for better administration and analysis.<\/li>\n\n<li><strong>Cost-effective: <\/strong>Loki is meant to be storage-efficient, making it possible to retain vast amounts of log data over time.<\/li>\n\n<li><strong>Scalability:<\/strong> Loki is designed to handle large amounts of log data and is horizontally scalable, allowing you to expand your log aggregating infrastructure as your requirements change.<\/li>\n<\/ul>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Install Grafana<\/strong><\/p>\n<cite>Grafana is a visualisation tool which supports loki as a data source.<\/cite><\/blockquote>\n\n<pre class=\"wp-block-code\"><code>yum install grafana<br \/>systemctl start grafana-server<br \/>systemctl enable grafana-server<\/code><\/pre>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Install Loki<\/strong><\/p>\n<cite>You could download the latest version of Loki from github.<\/cite><\/blockquote>\n\n<pre class=\"wp-block-code\"><code>curl -O -L \"https:\/\/github.com\/grafana\/loki\/releases\/download\/v2.8.6\/loki-linux-amd64.zip\"\nunzip \"loki-linux-amd64.zip\"<\/code><\/pre>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Install Promtail<\/strong><\/p>\n<cite>Promtail is the client which fetches the logs and forwards it to loki. In your client system, download the Promtail version that matches the Loki version you downloaded earlier.<\/cite><\/blockquote>\n\n<pre class=\"wp-block-code\"><code>curl -O -L \"https:\/\/github.com\/grafana\/loki\/releases\/download\/v2.8.6\/promtail-linux-amd64.zip\"\nunzip promtail-linux-amd64.zip<\/code><\/pre>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Download configuration files<\/strong><\/p>\n<cite>We need a sample\u00a0 configuration file for both Loki and Promtail to work. After downloading the sample configuration, we could make changes according to our requirement in the configuration file.<\/cite><\/blockquote>\n\n<pre class=\"wp-block-code\"><code>wget https:\/\/raw.githubusercontent.com\/grafana\/loki\/v2.8.6\/cmd\/loki\/loki-local-config.yaml<br \/>wget https:\/\/raw.githubusercontent.com\/grafana\/loki\/main\/clients\/cmd\/promtail\/promtail-local-config.yaml<\/code><\/pre>\n\n<p class=\"wp-block-paragraph\">In the configuration file Promtail, the IP address of the server needs to be provided in the url section of the yaml file. Also, the log file that needs to be checked can be provided in the \u201cPath\u201d section. By default, it will be \/var\/log\/*log<\/p>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Start Loki and Promtail<\/strong><\/p>\n<cite>Start Loki and Promtail by passing the configuration files<\/cite><\/blockquote>\n\n<pre class=\"wp-block-code\"><code>.\/loki-linux-amd64 -config.file=loki-local-config.yaml<br \/>.\/promtail-linux-amd64 -config.file=promtail-local-config.yaml<\/code><\/pre>\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>Access Grafana<\/strong><\/p>\n<\/blockquote>\n\n<pre class=\"wp-block-preformatted\">1. Grafana can be accessed with the format, IP address:3000\n2. Add your first data source URL as, IP address:3100\n3. After successful addition of data source, check log files with explore option.<\/pre>\n\n<p class=\"wp-block-paragraph\">Our <a href=\"https:\/\/www.skynats.com\/server-management\/\">Technical Team<\/a> will be available to assist you with Grafana Loki installation services that can make your job a lot easier. Get in Touch with <a href=\"https:\/\/www.skynats.com\/server-management\/\">Skynats<\/a> if you have any queries.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Grafana Loki is a log aggregation system, inspired by Prometheus, designed for easy setup and scalability. It offers an affordable solution for collecting, storing, and querying vast amounts of log data. As part of the Grafana Labs ecosystem, Grafana Loki is open-source and widely adopted. For users looking to implement it, Grafana Loki installation is [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[793,789,788,790,792,72],"class_list":["post-11306","post","type-post","status-publish","format-standard","hentry","category-blog","tag-grafana-loki","tag-log-management","tag-log-monitoring","tag-log-toubleshooting","tag-loki","tag-server-management"],"_links":{"self":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/11306","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/comments?post=11306"}],"version-history":[{"count":4,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/11306\/revisions"}],"predecessor-version":[{"id":14536,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/posts\/11306\/revisions\/14536"}],"wp:attachment":[{"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/media?parent=11306"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/categories?post=11306"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.skynats.com\/blog\/wp-json\/wp\/v2\/tags?post=11306"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}