At the bucket level, click on Properties, Expand Permissions, then Select Add bucket policy. Paste the above generated code into the editor and hit save.


{
    "Version": "2008-10-17",
    "Id": "Policy1380877762691",
    "Statement": [
        {
            "Sid": "AllowPublicRead",
            "Effect": "Allow",
            "Principal": {
                "AWS": "*"
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::Bucketname/*"
        }
    ]
}
Thursday, July 20, 2017

How to upgrade Nagios 4.2.2 to Nagios 4.3.2 step by step

Backup current nagios directory

cd /usr/local
tar -zcvf nagios-backup.ar.gz nagios

cd /tmp
wget https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.3.2.tar.gz .
tar -zxvf  nagios-4.3.2.tar.gz
cd nagios-4.3.2

./configure --with-command-group=nagcmd
make all
make install

Once the above process is completed run the verification check on the upgrade to make sure there are no errors reported.

# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

 It will give below warning then resolve by executing below command

WARNING: The normal_check_interval attribute is deprecated and will be removed in future versions. Please use check_interval instead.

for resolve excute cd /usr/local/nagios/etc/
sed -i -e 's/normal_check_interval/check_interval/g' *.cfg

WARNING: The normal_retry_interval attribute is deprecated and will be removed in future versions. Please use retry_interval instead.

for resolve excute cd /usr/local/nagios/etc/
sed -i -e 's/retry_check_interval/retry_interval/g' *.cfg

Verify once again vai /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Restart nagios it will show updated version

If face any issue just remove /usr/local/nagios directory and restore tar file backup and restart nagios

In this scenario you have upgraded the plugin on the Nagios server but the client has not been upgraded (hostname in this example).

You execute this command on the nagios server:
/usr/local/nagios/libexec/check_nrpe -H hostname

This is the result from running the command:
NRPE v2.15

On the NRPE v2 Client you will see the following logged per connection attempt:
Jul  5 08:16:22 hostname nrpe[11030]: Error: Request packet type/version was invalid!
Jul  5 08:16:22 hostname nrpe[11030]: Client request was invalid, bailing out...
Jul  5 08:17:21 hostname nrpe[11613]: Error: Request packet type/version was invalid!
Jul  5 08:17:21 hostname nrpe[11613]: Client request was invalid, bailing out...
Jul  5 08:17:44 hostname nrpe[11808]: Error: Request packet type/version was invalid!
Jul  5 08:17:44 hostname nrpe[11808]: Client request was invalid, bailing out...


On the Nagios server with the Plugin v3 will see the following logged per connection attempt:
Jun 24 16:42:04 fbsd01 check_nrpe: Remote 10.25.13.30 does not support Version 3 Packets
Jun 24 16:42:06 fbsd01 check_nrpe: Remote 10.25.13.30 accepted a Version 2 Packet

When the NRPE v3 client first establishes a connection, it tries with the v3 packet. This results in the older client rejecting the request. Upon receiving the rejected request the plugin will then attempt to connect with the v2 packet. This request will succeed however errors are produced in the log on the client and the Nagios server.
The options you have to stop the errors are:
    Upgrade the client to v3
        This will stop the errors
    Force the plugin to send v2 packets
        Using the -2 argument will force the plugin to connect with v2 packets
        /usr/local/nagios/libexec/check_nrpe -2 -H hostname

You will need to update your Nagios command and service definitions to include -2 to allow the plugin and client to communicate on nagios server

/usr/local/nagios/etc/checkcommands.cfg all check_nrpe updated as check_nrpe -2