Guide - Collect logs using Grafana Agent (Loki)

This is a beginners guide on how to collect log files on your linux machine using Grafana Agent and publish them to Grafana Cloud. Disclaimer: I conside myself a beginner in both linux, docker, grafana and yaml - this guide is written for beginners like me. There are multiple ways of installing Grafana Agent. I prefer to run Grafana Agent inside an docker container. Pre: Install docker First, install docker on your linux machine. There are multiple ways of doing this, depeneding on your OS. I’m using AMI2 (Amazon EC2 default OS): yum install docker sudo service docker start sudo...…

Introducing: Grafana for slack

Grafana for slack is an easy way to share your grafana panels to slack. It’s a “scratch my own itch” solution, I wanted to make it easy to share a panel on a cron schedule, e.g. every morning to a specific slack channel. It’s well integrated with Slack and only requires your Grafana API key and link to grafana panel. It alsow works well with Grafana Cloud. Note however that it relies on you having the Grafana Image renderer plugin installed, which is available for free. …

Sign in with fingerprint - asp.net

Sign in with fingerprint - asp.net Using the Passwordless API we can add secure and fast sign in to our existing asp.net apps. The API allows us to add sign in with FaceID, Fingerprint scan or other native methods like the android lock screen or Windows Hello. It makes it easy to consume the complex browser standards WebAuthn and FIDO2. Example on iOS 14: Exampe of Windows 10: Who is this guide for? It’s for you, a asp.net developer who want to make your existing web app more secure and faster to sign in to. I assume you already have...…

How to collect and visualize performance counters for ASP.NET on Azure App Services

I’ve recently had the unfortunate task to diagnose and monitor memory and GC related events for our asp.net api running on .net 4.7.2 in Azure App Services (Azure Web app). Information and examples on how to do this is hard to come by and perhaps not relevant due to the difference in azure appservices environment, so I thought I’d summarize my experience in Jan 2020. Note: I’m not sure if this post applies to .net core. …

Personal Access Tokens with IdentityServer4

In this post, I will describe how you can leverage existing IdentityServer features to generate and support PATs, as well as configuring your API Resources to accept them. Why Personal Access Tokens (PAT)? A PAT is a alternative to your username/password for authentication when working with Automation scripts or curl’ing your API where oAuth might be inconvenient or hard to implement. Reference Tokens Identityserver has built-in support to generate both JWT (Self-contained) and Reference Tokens (not self-contained). In contrast to JWTs, a reference token can easily be revoked which is a useful feature for a PAT. IdentityServer also expose introspection...…

jQuery in three lines of code

One code snippet I often return to when building something small and I need to select an element or add eventhandler is this: const $ = (selector) => document.querySelector(selector) const $$ = (selector) => document.querySelectorAll(selector) const on = (elem, type, listener) => elem.addEventListener(type,listener) …