Hi;
I ran the following: http://assets.nagios.com/downloads/nagi ... ramdisk.sh , on a brand new XI vm image however the nagios and npcd services don't want to auto start on a reboot. I was hoping you might have a suggestion as to how to correct that.
Thanks,
Paul
RAM disk and processes not auto starting after reboot
Re: RAM disk and processes not auto starting after reboot
Did you use the VMware VM or the vSphere OVF template? 32- or 64-bit? Can you post the "/etc/sysconfig/nagios" and the "/etc/init.d/nagios" files for a review?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: RAM disk and processes not auto starting after reboot
it was the ovf template 64 bit: nagiosxi-2014r2.7-64.ova
You do not have the required permissions to view the files attached to this post.
Re: RAM disk and processes not auto starting after reboot
I was able to recreate the issue. It is a bug.
I will be working on modifying the script. For the time being, here's a solution. Add the following line to the "/etc/sysconfig/nagios" file right below the "RAMDISK_SIZE=xxx" line. See an example below:
I will be working on modifying the script. For the time being, here's a solution. Add the following line to the "/etc/sysconfig/nagios" file right below the "RAMDISK_SIZE=xxx" line. See an example below:
Reboot your system and see if nagios and npcd will start OK. Let me know if this fixed your issue. Thanks!USE_RAMDISK=1
RAMDISK_DIR=/var/nagiosramdisk
RAMDISK_SIZE=500
mount -t tmpfs -o size=${RAMDISK_SIZE}m tmpfs ${RAMDISK_DIR}
...
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: RAM disk and processes not auto starting after reboot
yes they auto started, does show up as being mounted twice though i'm not sure if that matters
You do not have the required permissions to view the files attached to this post.
Re: RAM disk and processes not auto starting after reboot
I am sorry, one more change was needed. We need to mount the ramdisk only if it is not mounted already. As is, it will add a new mountpoint on each reboot. 
Replace the mount line:
in the /etc/sysconfig/nagios with this:
Reboot again, wait for a several seconds, then check:
Replace the mount line:
Code: Select all
mount -t tmpfs -o size=${RAMDISK_SIZE}m tmpfs ${RAMDISK_DIR}Code: Select all
if [ "`mount |grep "${RAMDISK_DIR} type tmpfs"`"X == "X" ]; then
mount -t tmpfs -o size=${RAMDISK_SIZE}m tmpfs ${RAMDISK_DIR}
fiCode: Select all
service nagios status
service npcd status
df -hBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: RAM disk and processes not auto starting after reboot
looks good now, both services are running and only one ramdisk, thank you for your help I appreciate it.
You do not have the required permissions to view the files attached to this post.
Re: RAM disk and processes not auto starting after reboot
Do you want us to close this topic, or do you want to leave it open for just a little longer in case this comes back?paul.jobb wrote:looks good now, both services are running and only one ramdisk, thank you for your help I appreciate it.
Former Nagios Employee.
me.
me.
Re: RAM disk and processes not auto starting after reboot
I think its fine to close