首页 > 系统相关 >Linux环境Prometheus接入(一、Prometheus安装)

Linux环境Prometheus接入(一、Prometheus安装)

时间:2023-11-03 16:25:04浏览次数:35  
标签:amd64 tar 2.47 接入 Linux prometheus Prometheus linux

环境

CentOS 7.9

安装

1、自行下载

https://prometheus.io/download/

2、命令下载

wget https://github.com/prometheus/prometheus/releases/download/v2.47.2/prometheus-2.47.2.linux-amd64.tar.gz

3、解压

tar -zvf prometheus-2.47.2.linux-amd64.tar.gz
mv prometheus-2.47.2.linux-amd64 /home/prometheus

4、配置系统服务

cat > /usr/lib/systemd/system/prometheus.service << EOF
[Unit]

[Service]
ExecStart=/home/prometheus/prometheus --config.file=/home/prometheus/prometheus.yml
ExecReload=/bin/kill -HUP \$MAINPID

[Install]
WantedBy=multi-user.target
Alias=dbus-org.fedoraproject.FirewallD1.service
EOF

5、启动、查看状态

systemctl start prometheus
systemctl status prometheus -l

验证

prometheus默认端口为9090,注意防火墙开启情况

访问对应IP:9090,可查看启动状态

标签:amd64,tar,2.47,接入,Linux,prometheus,Prometheus,linux
From: https://www.cnblogs.com/sefuture/p/17807823.html

相关文章

  • Linux环境Prometheus接入(二、Grafana安装)
    环境CentOS7.9安装1、命令下载yuminstall-yhttps://dl.grafana.com/enterprise/release/grafana-enterprise-10.2.0-1.x86_64.rpm2、启动、查看状态systemctlstartgrafana-serversystemctlstatusgrafana-server-l3、修改启动端口cd/etc/grafanavigrafa......
  • powershell自定义命令,类型linux的alias
    linux里经常取很多alias来方便敲命令。在win上也有类型功能,之前边百度边配过一次,然后今天要加一些,发现记不起来了。百度也不顺利。然后就找了一下之前的命令在哪里。C:\Windows\System32\WindowsPowerShell\v1.0下的profile.ps1。把自定义的函数写进去。就可以直接在powershell......
  • Linux版python安装教程
    如果你希望在CentOS上使用源码编译的方式安装Python3,请按照以下步骤进行操作:安装编译工具和依赖项:在开始编译前,需要安装一些编译工具和Python3的依赖项。在终端中运行以下命令:sudoyumgroupinstall"DevelopmentTools"sudoyuminstallopenssl-develbzip2-devellibff......
  • linux服务器安装python curl_cffi
    """在windows或mac上,直接pip3installcurl_cffi就能使用,但是在linux中,可能会缺少证书以下是Linux中的安装步骤:"""#安装第三方库pip3installcurl_cffi​#下载证书wgethttps://curl.se/ca/cacert.pem​#将证书添加到site-packagesmvcacert.pem/usr/local/lib/python3.8/si......
  • Linux越学越头疼,我要怎么办?
      最近,听到一些同学说,“Linux越学越头疼”。其实这句话,在我之前刚接触Linux的时候,也是深有感触。Linux越学越不明所以。最后干脆放弃学习,转而学习其他东西。其实大家在初学Linux的时候,有这个感受,也是十分正常和普遍的。我们大家从一开始接触计算机,便一直是Windows系统,从未使......
  • Linux的中断上下文中不能睡眠
      UnderstandingtheLinuxKernel,3rdEdition在4.3.NestedExecutionofExceptionandInterruptHandlers提到中断处理中不能阻塞,原文如下,Thepricetopayforallowingnestedkernelcontrolpathsisthataninterrupthandlermustneverblock,thatis,noproc......
  • Linux命令解释器
    Linux命令解释器 Linux切换Shell解释器命令:chsh:用于修改用户默认的登录Shell,可以使用该命令切换Shell解释器。exec:在当前Shell中执行新的Shell,例如执行"execbash"将当前Shell切换为Bash解释器。 设置默认命令解释器:chsh-s/bin/bash 1、列出系统中所有可用的shell......
  • prometheus-webhook-dingtalk 报警模板
    moretemplate.tmpl{{define"__subject"}}[{{.Status|toUpper}}{{ifeq.Status"firing"}}:{{.Alerts.Firing|len}}{{end}}]{{end}}{{define"__alert_list"}}{{range.}}---**告警名称**:{{index.Annotations"ti......
  • .Net 5.0 程序在 Linux 环境访问 SqlServer 2008R2 莫名报错:Connection reset by peer
    〇、问题详情同样的代码,在Windows上运行的好好的,拿到CentOS7上运行就出现如下报错:【ex.message】:Aconnectionwassuccessfullyestablishedwiththeserver,butthenanerroroccurredduringtheloginprocess.(provider:TCPProvider,error:35-Aninternal......
  • 在虚拟机(Linux)中Docker中部署Nginx成功,但是在宿主机无法访问Nginx站点?
    1.问题本文是基于黑马程序员Docker基础--常见命令一课中部署Nginx时遇到的问题作出解答。在虚拟机(Linux)中Docker中部署Nginx成功,但是在宿主机无法访问Nginx站点如图,Nginx服务已经启动成功但是我们在宿主机的浏览器试图访问的时候却总是报错:2.解决思路2.1查看端口号是否映......