Skip to content

My Tech Notes

Just another WordPress site

Recent Posts

  • cat a file and remove comments and blank lines
  • Using the label_replace function in PromQL
  • Removing old servers from Prometheus Database
  • Installing multiple packages from a list
  • Installing WordPress on a FreeNAS Jail

Recent Comments

  • cool math games on Playing A Sound in Unity
  • Robert on How to Unhide the User Library Folder on a Mac
  • How to replace the HDD in a 2011/2012 MacBook Pro – Malcolm's Tech Blog on Create a bootable installer for macOS
  • mark theodoras on Cross checking oracle ArchiveLogs using RMAN in Oracle 8 and 9
  • Jiminy Cricket on iOS Mail not syncing with Outlook

Archives

  • February 2021
  • January 2021
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • March 2019
  • August 2018
  • January 2018
  • December 2017
  • November 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • September 2016
  • July 2016
  • June 2016
  • May 2016
  • March 2016
  • February 2016
  • January 2016
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • June 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • May 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • August 2012
  • July 2012
  • June 2012
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • September 2010
  • August 2010
  • June 2010
  • May 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • January 2008

Categories

  • Action Script
  • Android
  • Apple
  • Application Review
  • AWS
  • Blackberry
  • Blogging
  • Database
  • DnD
  • Featured
  • Fedora
  • FreeBSD
  • FreeNAS
  • Game
  • General
  • ipad
  • iphone
  • iPod Touch
  • iTunes
  • Life
  • Lightroom
  • Linux
  • MacBook
  • Media Center
  • Mobile
  • Monitoring
  • mysql
  • Networking
  • Oracle
  • OSX
  • Other
  • Photography
  • Playbook
  • postgresql
  • Powershell
  • Programming
  • Prometheus
  • Raspberry Pi
  • RedHat
  • Server2012
  • Solaris
  • SQL Server
  • Swift
  • TSM
  • TV
  • Uncategorized
  • Unity
  • UNIX
  • Watch
  • Windows
  • Windows Phone
  • Windows10
  • windows7
  • Windows8
  • WP7
  • WP8

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Month: January 2021

Using the label_replace function in PromQL

do something like the following:

label_replace(up, "short_hostname", "$1", "instance", "(.+):(\\d+)")

Then put {{short_hostname}} in the legend field in Grafana

Posted on 24/01/2021Categories Monitoring, PrometheusTags Monitoring, Prometheus, PromQLLeave a comment on Using the label_replace function in PromQL

Removing old servers from Prometheus Database

Use a command similar to the following from a linux command line.

curl -X POST -g 'http://192.168.1.114:9090/api/v1/admin/tsdb/delete_series?match[]={instance="oracle1"}'

Posted on 24/01/2021Categories PrometheusTags Monitoring, PrometheusLeave a comment on Removing old servers from Prometheus Database
Proudly powered by WordPress