[转帖]Prometheus Shell Exporter
Shell Exporter can execute Powershell or Bash scripts and transform its output to Prometheus metrics.
Metrics
Shell Exporter exposes metrics based on your Powershell or Bash scripts names. Examples of scripts can be finded at metrics folder
| Script name | Metric name |
|---|---|
bash_gauge.sh |
bash_gauge |
pse_tcp_connection_metrics.ps1 |
pse_tcp_connection_metrics |
pse_tcp_dynamic_port_range_number_of_ports.ps1 |
pse_tcp_dynamic_port_range_number_of_ports |
Startup options
| Option | Default value | Description |
|---|---|---|
| --f | ./metrics |
scripts directory |
| --port | 9360 | exporter port |
| --help | - | show help |
| --version | - | show exporter version |
Installing as Windows Service
- Download binary
- Install nssm via Chocolatey
| Action | Command |
|---|---|
| install | nssm install shell_exporter C:\shell-exporter.exe -f C:\scripts |
| remove | nssm remove shell_exporter confirm |
Development
- Make branch from
master - Reopen repo at vscode container
- Make necessary changes
- Push it to branch and make pull-request
Makefile targets
| Target | Action |
|---|---|
| build | build binary for linux and windows platforms |
| tidy | remove all dependencies from the go.mod file which are not required in the source files |
| test | run unit tests |
| lint | run linting |
| run | run exporter locally |
[转帖]Prometheus Shell Exporter的更多相关文章
- [转帖]prometheus数据采集exporter全家桶
prometheus数据采集exporter全家桶 Rainbowhhy1人评论2731人阅读2019-04-06 15:38:32 https://blog.51cto.com/13053917/2 ...
- Prometheus之Exporter开发
Prometheus开发Exporter简介 Exporter 本身是一个http 服务,其指标结果只要符合 Prometheus 规范就可以被 Prometheus 使用. Prometheus中m ...
- 【开源监控】Prometheus+Node Exporter+Grafana监控linux服务器
Prometheus Prometheus介绍 Prometheus新一代开源监控解决方案.github地址 Prometheus主要功能 多维 数据模型(时序由 metric 名字和 k/v 的 l ...
- Prometheus + Node Exporter + Grafana 监控主机运行信息
上一篇文章中讲了如何利用Prometheus和Grafana监控SpringBoot应用的JVM信息,这次就来看看如何监控 服务器运行状态,先列出用到的工具: Prometheus node_ex ...
- Prometheus 自定义exporter 监控key
当Prometheus的node_exporter中没有我们需要的一些监控项时,就可以如zabbix一样定制一些key,让其支持我们所需要的监控项. 例如,我要根据 逻辑cpu核数 来确定load的告 ...
- 使用golang编写prometheus metrics exporter
metrcis输出 collector.go package main import ( "github.com/prometheus/client_golang/prometheus&qu ...
- [转帖][Bash Shell] Shell学习笔记
[Bash Shell] Shell学习笔记 http://www.cnblogs.com/maybe2030/p/5022595.html 阅读目录 编译型语言 解释型语言 5.1 作为可执行程序 ...
- [转帖]Prometheus+Grafana监控Kubernetes
原博客的位置: https://blog.csdn.net/shenhonglei1234/article/details/80503353 感谢原作者 这里记录一下自己试验过程中遇到的问题: . 自 ...
- [转帖]编写shell脚本所需的语法和示例
编写shell脚本所需的语法和示例 https://blog.csdn.net/CSDN___LYY/article/details/100584638 在说什么是shell脚本之前,先说说什么是sh ...
- [转帖]linux Shell sort按照指定列排序
linux Shell sort按照指定列排序 https://blog.csdn.net/weixin_38308151/article/details/80760133 kubectl get p ...
随机推荐
- SQL注入Fuzzing字典
需要的自取 ' " # - -- ' -- --'; ' ; = ' = ; = -- \x23 \x27 \x3D \x3B' \x3D \x27 \x27\x4F\x52 SELECT ...
- Java 8升级Java 11,升级必知要点!竟然有这些坑…
随着技术的不断进步,Java作为一种广泛使用的编程语言,其版本更新带来了许多新特性和性能提升.从Java 8升级到Java 11,是一个重要的转变,它不仅带来了新的编程范式,还引入了对现代软件开发的多 ...
- 不是银趴~是@Import!
首先我们要明确:@Import 注解是 Spring 提供的. 然后我们看一下该注解的官方注释: Indicates one or more component classes to import - ...
- GDAL创建JPG或PNG格式图像
目录 1. 概述 2. 实现 1. 概述 根据GDAL文档,JPG/PNG格式支持读取和批量写入,但不支持实时更新.也就是不支持Create()方法,但是支持CreateCopy()方法.也可能是由于 ...
- Java 将PDF转为OFD
OFD格式一种国产文件格式,在一些对文档格式有着严格的企业中用得比较多.下面,通过Java程序展示如何将PDF文件转为OFD格式. 代码思路:加载PDF源文档,调用Spire.Pdf.jar提供的sa ...
- Java 插入、隐藏/显示、删除Excel行或列
概述 操作Excel工作表时,对表格中的行或列数据可执行,包括插入.隐藏.显示.删除等在内的多种操作需求,本文将通过Java代码示例演示每种操作的具体实现方法.文中方法使用了Java Excel类库( ...
- 干货分享丨玩转物联网IoTDA服务系列六-恒温空调
摘要:本文主要讲述空调接入到物联网平台后,通过恒温空调控制系统,不论空调是否开机,都可以调整空调默认温度,待空调上电开机后,自动按默认温度调节. 场景简介 通过恒温控制系统,不论空调是否开机,都可以调 ...
- 基于ModelArts进行流感患者密接排查
摘要:针对疫情期间存在的排查实时性差.排查效率低.无法追踪密接者等问题,可以使用基于YOLOv4的行人检测.行人距离估计.多目标跟踪的方案进行解决. 本文分享自华为云社区<基于ModelArts ...
- 云原生开发者须具备的1+N技能,开启第二曲线
摘要:云的大环境下,意味以云为中心的快速应用开发能力将成为"胜负手".在现如今如此复杂的外部环境,且高速发展的情况下,为了不重蹈覆辙,必须需要开发者的第二曲线来破局! 随着云计算的 ...
- 云图说丨应用宕机怎么办?MAS帮您实现业务无缝切换
摘要: 多云高可用服务(Multi-cloud high Availability Service,简称MAS)源自华为消费者多云应用高可用方案,提供从流量入口.数据到应用层的端到端的业务故障切换及容 ...