icinga2

New Nagios BASH plugin output error: “Such Instance currently exists at this OID: integer expression expected”

冷暖自知 提交于 2019-12-14 04:08:58
问题 I'm trying to write my first Nagios plugin to check the statuses on WLAN Controllers APs. The goal was to make a kind of "universal" plugin but I'm getting an error: .1.3.6.1.4.1.14179.2.2.1.1.3.0.: Unknown Object Identifier () /usr/lib/nagios/plugins/check_wlc_ap_state.sh: line 50: [: Such Instance currently exists at this OID: integer expression expected /usr/lib/nagios/plugins/check_wlc_ap_state.sh: line 53: [: Such Instance currently exists at this OID: integer expression expected /usr

How to use heredoc to answers prompt questions

ε祈祈猫儿з 提交于 2019-12-13 23:03:36
问题 I am trying to automate the installation of Icinga2 on many remote clients. The PKI token will get generated on the Icinga server and it's different for each client - Then it should be sent to each client. As part of the client installation, icinga2 node wizard would run and I would like to pipe a series of inputs to a prompt as below. Can you please check to see if I use the heredoc correctly? #!/bin/bash while read f; do ssh-copy-id myusername"$f" ssh myusername@"$f" ' yum install -y epel

How to ssh to remote hosts and run multiple commands

痴心易碎 提交于 2019-12-13 10:19:24
问题 I have a script that reads a text file that has all the nodes listed in there: node1 node2 node3 . . . This is part my script: #!/bin/bash while read f; do ssh-copy-id myusername@"$f" "yum install -y epel-release; wget --no-check-certificate https://packages.icinga.org/epel/7/release/noarch/icinga-rpm-release-7-1.el7.centos.noarch.rpm;yum install https://packages.icinga.org/epel/7/release/noarch/icinga-rpm-release-7-1.el7.centos.noarch.rpm; yum install -y icinga2; yum install -y nagios

Automate feeding the output of a command to a prompt

戏子无情 提交于 2019-12-11 17:42:56
问题 I have a script that reads a text file that has all the nodes listed in there: node1 node2 node3 . . . This is my script: #!/bin/bash while read f; do ssh-copy-id myusername@"$f" ssh username@master.icinga.test.com icinga2 pki ticket --cn '$f' done < linux-list.txt while read f; do ssh myusername@"$f" ' yum install -y epel-release wget --no-check-certificate https://packages.icinga.org/epel/7/release/noarch/icinga-rpm-release-7-1.el7.centos.noarch.rpm yum install icinga-rpm-release-7-1.el7