Zabbix agent自动安装脚本

简单的zabbix agent自动安装脚本 yum -y groupinstall "Development Tools" yum -y install ntpdate ###?录?rontab PROGRAM='ntpdate cn.pool.ntp.org' CRONTAB_CMD="*/5 * * * * $PROGRAM" (echo "$CRONTAB_CMD") | crontab - groupadd -g 201 zabb 阅读详情

假设在Zabbix Server的站点目录为/var/www/zabbix  ,IP为192.168.1.254:

mkdir -p /var/www/zabbix/zabbix_agentd/32
mkdir -p /var/www/zabbix/zabbix_agentd/64

mkdir -p /var/www/zabbix/zabbix_agentd/conf

将对应版本的zabbix_agentd和conf文件复制到相应目录。


配置/etc/httpd/conf/httpd.conf文件,在zabbix server相应节点添加下列内容:

<Directory "/var/www/zabbix/zabbix_agentd/">

    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all

</Directory>

这样,我们就可以浏览和获取Zabbix Server的站点zabbix_agentd目录下的文件。


创建zabbixinstall.sh脚本文件,内容如下:

#!/bin/bash

netstat -ntlp|grep zabbix_agentd
testzabbix_agentd=`netstat -ntlp|grep zabbix_agentd`
if [[ "${testzabbix_agentd}" == "" ]]
then
mkdir /usr/local/zabbix/sbin/ -p
cd /usr/local/zabbix/sbin/

testuname=`uname -m`
if [[ "${testuname}" == "x86_64" ]]
then
rm -rf /usr/local/zabbix/sbin/zabbix_agentd
wget http://192.168.0.254/zabbix_agentd/64/zabbix_agentd
else
rm -rf /usr/local/zabbix/sbin/zabbix_agentd
wget http://192.168.0.254/zabbix_agentd/32/zabbix_agentd
#echo "/usr/local/lib" >> /etc/ld.so.conf
#ldconfig
fi

IP="`ifconfig |grep 192.168|grep "inet addr:"|awk -F "  Bcast:" '{print $1}'|awk -F "inet addr:" '{print $2}'`"
Server="192.168.1.254"
echo "Server=${Server}" > /usr/local/zabbix/sbin/zabbix_agentd.conf
echo "Hostname=${IP}" >> /usr/local/zabbix/sbin/zabbix_agentd.conf
adduser zabbix
chmod +x /usr/local/zabbix/sbin/zabbix_agentd
echo "/usr/local/zabbix/sbin/zabbix_agentd -c /usr/local/zabbix/sbin/zabbix_agentd.conf" >> /etc/rc.local
/usr/local/zabbix/sbin/zabbix_agentd -c /usr/local/zabbix/sbin/zabbix_agentd.conf
rm zabbixinstall.sh -rf
netstat -ntlp|grep zabbix_agentd
else
echo "zabbix_agentd already install."
rm zabbixinstall.sh -rf
exit
fi

4G+GNSS定位模块DX-CT511N-B:AT指令实战与多协议通信指南 本文详细介绍了4G+GNSS定位模块DX-CT511N-B的AT指令实战应用与多协议通信配置。内容涵盖TCP/UDP通信、MQTT协议集成、HTTP服务交互以及GNSS定位功能的深度解析,为开发者提供从基础指令到高级调试的完整指南,助力物联网设备开发。 阅读详情

相关推荐

FOFA奇技淫巧:从搜索语法到实战场景的深度挖掘

本文深入探讨了FOFA搜索语法在网络空间测绘中的高效应用,从基础语法到实战场景的深度挖掘。通过渗透测试、威胁狩猎、资产发现等实际案例,展示了如何利用FOFA精准定位目标系统、识别蜜罐、追踪威胁,并提供了合规使用指南和性能优化技巧,助力安全工作者提升效率。

weixin_32428571的博客 235

【Zabbix】zabbix_agent安装脚本

一. install_zabbix_agent_centos5.sh #!/bin/bash yum -y install unixODBC-devel unix...

cubi56517的博客 238

从d、q轴电流到电机性能:FOC控制中角度偏移的实战影响与调试策略

本文深入探讨了永磁同步电机FOC控制中d、q轴电流与角度偏移对电机性能的影响及调试策略。通过分析角度偏移导致的效率下降、电流异常等问题,提供了实用的四步调试法和参数优化技巧,帮助工程师有效提升电机控制精度和效率。

weixin_29264201的博客 293

zabbix-agent配置安装(linux),内含批量安装配置脚本

zabbix-agent配置安装(linux),,内含批量安装配置脚本

qq_59647823的博客 703

资源描述框架RDF及Turtle

文章目录1. RDF1.1 简介1.2 格式1.3 RDF的要求2. Turtle2.1 语法2.1.1 简单三元组2.1.2 Turtle中的命名空间2.1.3 Base URI2.1.4 谓语列表2.1.5 宾语列表2.1.6 空白节点(bNodes)2.1.7 数据类型2.1.8 Class membership2.1.9 空URI2.1.10 集合 1. RDF 1.1 简介 RDF(Resource Description Framework)语义网的标准数据模型,是一个用于描述 Web 上的资

doublewhite233的博客 2491

CZT与FFT频谱分析方法对比:从任意频带重采样到高精度频谱分析

M = 85 % 输出点数f0 = 70 Hz % 起始频率DELF = 0.4 Hz % 频率步长频率分辨率提高到0.4 Hz分析带宽聚焦在[70, 103.6]Hz更清晰地分辨出78Hz和82Hz的频率分量。

2403_88098319的博客 1859

zabbix-agent 安装脚本(任意版本通用)

zabbix版本 5.0 (版本的话无所谓直接根据需求换版本就行)这个就是最基本的脚本哈 只是我给串联起来了 相信大家都可以看懂。需要可以联网,如果不能联网就根据链接下载rpm包就可以。系统:redhat7.9。

weixin_54044544的博客 408

用户行为数据分析 User Behavior Data from Taobao for Recommendation

一、提出问题 二、理解数据 数据来源 阿里云天池数据集:(https://tianchi.aliyun.com/dataset/dataDetail?dataId=649) 本文选取的数据集为UserBehavior.csv,共有5242880条数据。数据的具体类别如下表所示: 用户行为种类有四种,如下表所示 对于数据维度的说明如下: 在本文选取的2017年11月25日到2017年12月3日的时间范围内,不重复的用户数量为10202,不重复的商品ID数为412369,不重复的商品类目ID数为5859,

cccxxxqq的博客 5205

从0开始linux上zabbix-server\agent安装

新建虚拟机--典型--稍后安装操作系统--选择操作系统及版本--命名虚拟机(虚拟机名和位置)--指定磁盘容量(最大磁盘大小可以根本自己电脑情况进行调整)--完成虚拟机安装完成后点击编辑虚拟机设置使用已经预先下载好的Centos7镜像文件选择install Centos 7,接下来步骤根据提示按enter键即可选择语言,修改时间、时区、安装位置等。最后为root用户设置密码等待安装成功,重启即可。

scasdsasa的博客 3147

超越图灵机——论人工智能实现的可能性(一)

超越图灵机——论人工智能实现的可能性(一)我认为人工智能是可以实现到逻辑思维这一步的,因为逻辑思维可以完全用字符串来表示,图灵机可以把任意单元置成任意值,在这一点上是完备的,这就足以描述逻辑思维了,所以用图灵机完全可以实现到逻辑思维。当然图灵机会受到哥德尔不完备性的制约,但是逻辑系统也会受到同样的制约,所以我认为完全可以用图灵机实现逻辑思维。那么逻辑思维的本质机理与图灵机是什么关系?逻辑思

太极语言 1万+

如何免费快速的部署一个自用免VIP的自动追剧工具!NAS新玩法!豆瓣与迅雷结合,轻松实现自动下载电影自动追剧功能(支持Windows,群晖nas,飞牛nas,软路由,服务器等Docker快速部署)

追剧党狂喜!豆瓣追剧神器,自动添加云盘,自动下载,微信通知,一键搞定!

XiaoqiangClub的博客 4582

zabbix 安装脚本完整版

zabbix 服务安装完整脚本

i_l_linux的博客 965

【WRF编译-Lab1】使用自动脚本编译WRF:错误总结

WRF编译过程及错误总结

WW、forever的博客 82

zabbix agent自动安装脚本

#!/bin/bash ZABBIX_AGENT=/tmp/zabbix*.tar.gz id zabbix > /dev/null 2>&1 if [ $? -eq 1 ];then useradd zabbix -u 201 -s /sbin/nologin fi tar xvf $ZABBIX_AGENT -C /tmp cd /tmp/zabbix* /tmp/zab

ltz3210的专栏 858

Statistics and Machine Learning Toolbox

Statistics and Machine Learning Toolbox(带书签),MATLAB统计学习工具

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

Zabbix_Agent windows下自动安装脚本

@echooff echocopyingexe netusey:\\192.168.1.8\软件共享\服务软件\Zabbix\\映射远程共享目录 xcopyY:\zabbix_agentd.exec:\windows\\\复制到本地目录 netusey:/delete...

weixin_33852020的博客 430

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

zabbix-agent自动安装脚本

项目地址:https://github.com/zhangrj/auto-install-zabbix-agent 一、背景 前段时间给公司部署zabbix时用的,我们这边操作系统大致只有三类,RHEL/SLES/Windows Server,公司没有自动化运维工具,我用这个脚本大概装了两百多台服务器,包括CentOS5/6/7、SUSE Linux Enterprise Server 9/...

洒满阳光的午后的博客 1223

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Windows自动安装Zabbix_agent脚本

需要用管理员身份执行以下脚本,即可实现自动下载Zabbix_agent+自动解压缩+自动修改配置文件+自动注册+自动定时重启;

tiger57的博客 887

自动安装zabbix_agent脚本 -- python2

#!/usr/bin/env python # -*- coding: utf-8 -*- import os ZABBIX_SERVER_IP='10.171.100.28' if os.path.exists('/usr/local/zabbix-agent'): print """ *********************************...

weixin_34121282的博客 228

Linux:shell脚本自动安装zabbix-agent

Linux:shell脚本自动安装zabbix-agent #!/bin/bash # zabbix repo # 脚本使用yum的方式进行安装 # https://repo.zabbix.com/zabbix/ # 获取本机IP地址 此处获取ens 接口的IP地址 ipaddr=$...

那个那个 673

自动安装Zabbix Agent的linux 脚本

安装Zabbix代理的脚本: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 ...

weixin_34248705的博客 173

Ubuntu、CentOS、debian下Zabbix agent自动安装脚本

最近使用过的Zabbix agent自动安装脚本,做个备份。所用服务器环境为Ubuntu10.04 64位,Ubuntu官方源中的Zabbix agent有点陈旧,都是老版本了,这里用的是目前最新版本2.0.5.需要更具需求来装了! 将以下内容保存为Zabbixinstall.sh,放置合适目录,并通过chmod获取相应权限后运行(./zabbixin...

weixin_34334744的博客 231

自动安装zabbix agent的shell脚本

#!/bin/bash #install the zabbix agent #Create by ShiYong id zabbix &> /dev/null || useradd -s /sbin/nologin zabbix mkdir /etc/zabbix /var/log/zabbix chown zabbix.zabbix /var/log/zabbi...

dhissfn3643的博客 256

一个安装zabbix_agentd的脚本

配合之前写的Zabbix客户端的安装过程,地址在http://chenx1242.blog.51cto.com/10430133/1828777,于是就写一个自动安装zabbix_agentd的脚本,这个可以搭配ansible的script模块一起食用,口味更佳。 vimauto_install_zabbix_agent.sh #!/bin/bash #writtenb...

weixin_33686714的博客 124

windows bat脚本自动安装与启动zabbix agent 防火墙开通10050

我在公司搭建zabbix server 之后,想要将公司所有的windows服务器加入zabbix ,但是由于服务器有很多,如果一台一台安装zabbix agent 那么会浪费很多时间。所以这里我们使用bat脚本来部署zabbix agent 创建bat脚本 %1 mshta vbscript:CreateObject("Shell.Application").ShellExecut...

qq_42165363的博客 1206
上一篇: Centos 5.5安装zabbix 1.8.10
下一篇: SQL SERVER2012新功能之新分页语法
seteor
博客等级 码龄22年 37粉丝 62原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值