Off-load Database option at install?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: Off-load Database option at install?

Post by TBT »

benjaminsmith wrote:Hi,

The ramdisk would not affect XI users. Something is still not set up right with the ramdisk, can you post the output to the following commands:

Code: Select all

df -h
ls -lR /var/nagiosramdisk/
cat /lib/systemd/system/ramdisk.service
systemctl status  ramdisk.service
Additionally, the manual setup instructions are on page 3 of the doc, I would go through each step again to make sure nothing was missed.

Nagios XI Utilizing a RAM Disk in Nagios XI

Benjamin

Code: Select all

# df -h
Filesystem                         Size  Used Avail Use% Mounted on
udev                               5.9G     0  5.9G   0% /dev
tmpfs                              1.2G  129M  1.1G  11% /run
/dev/sda1                           97G   12G   81G  13% /
tmpfs                              5.9G   16K  5.9G   1% /dev/shm
tmpfs                              5.0M     0  5.0M   0% /run/lock
tmpfs                              5.9G     0  5.9G   0% /sys/fs/cgroup
tmpfs                              100M   44M   57M  44% /var/nagiosramdisk
tmpfs                              1.2G     0  1.2G   0% /run/user/1000

Code: Select all

# ls -lR /var/nagiosramdisk/
/var/nagiosramdisk/:
total 44384
-rw-r--r-- 1 nagios nagios  1914562 Oct 14 13:20 host-perfdata
-rw-r--r-- 1 nagios nagios   229588 Oct 12 17:15 objects.cache
-rw-r--r-- 1 nagios nagios 42967394 Oct 14 13:20 service-perfdata
drwxrwxr-x 5 nagios nagios      100 Oct 12 17:15 spool
-rw-r--r-- 1 nagios nagios   327115 Oct 14 13:20 status.dat
drwxrwxr-x 2 nagios nagios       40 Oct 14 13:05 tmp

/var/nagiosramdisk/spool:
total 0
drwxrwxr-x 2 nagios nagios 40 Oct 14 13:05 checkresults
drwxrwxr-x 2 nagios nagios 40 Oct 12 17:15 perfdata
drwxrwxr-x 2 nagios nagios 40 Oct 12 17:15 xidpe

/var/nagiosramdisk/spool/checkresults:
total 0

/var/nagiosramdisk/spool/perfdata:
total 0

/var/nagiosramdisk/spool/xidpe:
total 0

/var/nagiosramdisk/tmp:
total 0

Code: Select all

~# cat /lib/systemd/system/ramdisk.service
[Unit]
Description=Ramdisk
Requires=local-fs.target
After=local-fs.target
Before=nagios.service
[Service]
Type=simple
RemainAfterExit=yes
Restart=always
ExecStartPre=/usr/bin/mkdir -p -m 775 /var/nagiosramdisk
ExecStartPre=/usr/bin/mount -t tmpfs -o size=100m tmpfs /var/nagiosramdisk
ExecStartPre=/usr/bin/mkdir -p -m 775 /var/nagiosramdisk/tmp /var/nagiosramdisk/spool /var/nagiosramdisk/spool/checkresults /var/nagiosramdisk/spool/xidpe /var/nagiosramdisk/spool/perfdata
ExecStart=/usr/bin/chown -R nagios:nagios /var/nagiosramdisk
[Install]
WantedBy=multi-user.target

Code: Select all

~# systemctl status  ramdisk.service
● ramdisk.service - Ramdisk
   Loaded: loaded (/lib/systemd/system/ramdisk.service; enabled; vendor preset: enabled)
   Active: active (exited) since Tue 2021-10-12 17:15:30 EDT; 1 day 20h ago
  Process: 596 ExecStartPre=/usr/bin/mkdir -p -m 775 /var/nagiosramdisk (code=exited, status=0/SUCCESS)
  Process: 606 ExecStartPre=/usr/bin/mount -t tmpfs -o size=100m tmpfs /var/nagiosramdisk (code=exited, status=0/SUCCESS)
  Process: 607 ExecStartPre=/usr/bin/mkdir -p -m 775 /var/nagiosramdisk/tmp /var/nagiosramdisk/spool /var/nagiosramdisk/spool/checkresults /var/nagiosramdisk/spool/xidpe /var/nagiosramdisk/spool/perfdata (code=exited, status=0/SUCCESS)
  Process: 609 ExecStart=/usr/bin/chown -R nagios:nagios /var/nagiosramdisk (code=exited, status=0/SUCCESS)
 Main PID: 609 (code=exited, status=0/SUCCESS)

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
Okay, keeping in mind RAMdisk was initially Auto installed, modified by the restore/repair and then manually modified by us as per the document. I will verify the configuration again as per that document and report back.

UPDATE: Confirmed, RAMdisk configuration appears as outlined under Manual Installation.
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Off-load Database option at install?

Post by benjaminsmith »

Hi,

Thank you, all the last output looks okay to me, can you send over a fresh profile for us to review once more?

Regards,
Benajmin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Off-load Database option at install?

Post by benjaminsmith »

Hi,

I got the profile and found a few more corrections. The commands for processing perf data did not get updated properly.

Code: Select all

define command {
	command_name	process-host-perfdata-file-bulk
	command_line	sed -i 's/\\n\t/\t/g' /mnt/ramdisk/host-perfdata && /bin/mv /mnt/ramdisk/host-perfdata /mnt/ramdisk/spool/xidpe/$TIMET$.perfdata.host
	}
define command {
	command_name	process-service-perfdata-file-bulk
	command_line	sed -i 's/\\n\t/\t/g' /mnt/ramdisk/service-perfdata && /bin/mv /mnt/ramdisk/service-perfdata /mnt/ramdisk/spool/xidpe/$TIMET$.perfdata.service
	}
Those should look like:
ramdisk-commands.png
Take a look at the bottom of page 9 for steps on how to update those.
https://assets.nagios.com/downloads/nag ... giosXI.pdf

Also, I would recommend increasing the default thresholds on the perf data processor. Here's a link to the instructions.

https://support.nagios.com/kb/article.php?id=9

Let us know if that resolves the issue, if not, send over the latest profile again.

Regards,
Benjamin
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
TBT
Posts: 625
Joined: Wed May 18, 2011 1:26 pm

Re: Off-load Database option at install?

Post by TBT »

benjaminsmith wrote:Hi,

I got the profile and found a few more corrections. The commands for processing perf data did not get updated properly.

Code: Select all

define command {
	command_name	process-host-perfdata-file-bulk
	command_line	sed -i 's/\\n\t/\t/g' /mnt/ramdisk/host-perfdata && /bin/mv /mnt/ramdisk/host-perfdata /mnt/ramdisk/spool/xidpe/$TIMET$.perfdata.host
	}
define command {
	command_name	process-service-perfdata-file-bulk
	command_line	sed -i 's/\\n\t/\t/g' /mnt/ramdisk/service-perfdata && /bin/mv /mnt/ramdisk/service-perfdata /mnt/ramdisk/spool/xidpe/$TIMET$.perfdata.service
	}
Those should look like:
ramdisk-commands.png
Take a look at the bottom of page 9 for steps on how to update those.
https://assets.nagios.com/downloads/nag ... giosXI.pdf

Also, I would recommend increasing the default thresholds on the perf data processor. Here's a link to the instructions.

https://support.nagios.com/kb/article.php?id=9

Let us know if that resolves the issue, if not, send over the latest profile again.

Regards,
Benjamin
Something isn't right here, I am not seeing what you're seeing. This looks correct in XI, always has been since the Auto Install of RAMdisk. See below. I'm thinking it's time for a call. UPDATE: I just tried to call your office at 1-651-204-9102, the IVR message said it's afterhours and you're closed (3:28 EST)?
file-bulk.PNG
You do not have the required permissions to view the files attached to this post.
Nagios XI 2024R2.2.1 (8 Servers)
Nagios Fusion 2024R1.0.2
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Off-load Database option at install?

Post by benjaminsmith »

Hi Tyler,

I see the ticket, so I will go ahead and close this out.

Here are the test commands for the offloaded database. The database info is store in /usr/local/nagiosxi/html/config.inc.php.

Code: Select all

 mysql -u nagios -p'nagiosP@ssw0rd' -h <IP_ADDRESS_OF_MYSQL_OR_MARIADB_SERVER> -e STATUS;
mysql -u nagiosql -p'nagiosqlP@ssw0rd' -h <IP_ADDRESS_OF_MYSQL_OR_MARIADB_SERVER> -e STATUS;
mysql -u nagiosxi -p'nagiosxiP@ssw0rd' -h <IP_ADDRESS_OF_MYSQL_OR_MARIADB_SERVER> -e STATUS;
Can you also add the database log to the ticke from the remote system, and it would be nice to get dump of the nagisoql database. The command is as follows (adjust as necessary with your password).

Code: Select all

mysqldump -uroot -pnagiosxi nagiosql > nagiosql.sql
As mentioned in our call, there are 3 separate databases:
nagiosxi - contains all user account and GUI settings (yours in running in postgres)
nagiosql - contains the configuration data (show in the Core Config Manager)
nagios - contains incoming check results and used to display status info
Have a good weekend.
-Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked