Hi again, sorry for the late reply.
I've been trying my best to develop a zenpack for this, and though I was off to a good start I'm soon realizing I'm over my head...
So I think I'll be focusing my efforts from now on getting the nagios plugin to work instead :-)
I'm able to run the nagios commands from the command line, so hopefully, the rest should be possible to figure out.
Subject: |
RE: Qnap NAS - SNMP monitoring disk status |
Author: |
Arthur |
Posted: |
2020-06-17 06:25 |
Hi Odd
Some code which could eventually help you.
#Create a backup in ContolCenter
# as root on the zenoss master
mkdir /tmp/nagios
# copy the plugin to /tmp/nagios
cp check_qnap /tmp/nagios
# cd into /tmp/nagios
cd /tmp/nagios
# chmod 755 the plugin
chmod 755 check_qnap
# create a variable for later use
mynew=InstallNagiosPlugin
# start a new zope container with a rw layer
serviced service shell -s $mynew -i zope
# copy the plugin to /usr/lib64/nagios/plugin
# /mnt/pwd is important
cp /mnt/pwd/check_qnap /usr/lib64/nagios/plugins
chmod 755 /usr/lib64/nagios/plugins/check_qnap
# exit the container
exit
# commit the changes
serviced snapshot commit $mynew
# record the snapshot ID
# restart Zenoss. Some do only rstart zope.
# if all is ok you can remove the snapshot
serviced snapshot list
serviced snapshot remove <snapshot_id>
------------------------------
Arthur
------------------------------
Subject: |
RE: Qnap NAS - SNMP monitoring disk status |
Author: |
Michael Rogers |
Posted: |
2020-06-17 12:04 |
Arthur is absolutely on point, but I wanted to add in my $0.02:
# restart Zenoss. Some do only rstart zope.
If the plugin is to be accessible from zencommand containers, they'll need a restart, too. At this point in the instructions, they'll still be running on the original Docker image and won't have the filesystem layer with the new Nagios plugin. After restarting, they'll pull the updated image and the plugin will be available to them.
This also ties back to Arthur's comment that these changes will be lost when you upgrade. New versions of Zenoss Core come with new Docker images which will replace the image you updated in these instructions.
------------------------------
Michael J. Rogers
Senior Instructor - Zenoss
Austin TX
------------------------------
Subject: |
RE: Qnap NAS - SNMP monitoring disk status |
Author: |
Arthur |
Posted: |
2020-06-21 01:16 |
Hi Michael
Thanks for the helpful comment.
------------------------------
Arthur
------------------------------