hi,
i have two questions :
1. i found /usr/local/nagiosxi/tmp is a temp folder for Schedule Report.
Everytime send a report email, it will create a .pdf file inside /usr/local/nagiosxi/tmp folder, after send the email, files automatically will be deleted.
I want to ask : how can i turn off automatically delele file inside this folder and change it to manually delete. Where i can find this config? i want keep these file more than 1 day then manually remove.
2. when i schedule the performance graphs report, and see the Schedule report history, it usually have Error in Status column(sometime success), but mail success sent, pdf file open ok. Dont know why it happen.
thank you.
how to turn off automatically delete file in temp folder
-
- Posts: 194
- Joined: Wed Dec 23, 2020 10:15 pm
how to turn off automatically delete file in temp folder
You do not have the required permissions to view the files attached to this post.
Last edited by sacom01 on Mon Jun 14, 2021 8:48 pm, edited 1 time in total.
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: how to turn off automatically delete file on temp file
Hi @sacom01,
On the first question, I'm pretty sure that option is set in the code, but I'll follow up with the developer to see if there are any changes to the configuration files that would change that behavior.
On your second question, I believe it's taking longer to generate and send the report, and that's why the status is not being returned as expected but it's still sending the report successfully.
Have you optimized the PHP settings on this server yet. If not, please go ahead and increase the memory, input variable, and execution time as directed in the article below, and let me know if you notice an improvement. Thanks, Benjamin
Nagios XI - Optimizing The PHP Settings File
On the first question, I'm pretty sure that option is set in the code, but I'll follow up with the developer to see if there are any changes to the configuration files that would change that behavior.
On your second question, I believe it's taking longer to generate and send the report, and that's why the status is not being returned as expected but it's still sending the report successfully.
Have you optimized the PHP settings on this server yet. If not, please go ahead and increase the memory, input variable, and execution time as directed in the article below, and let me know if you notice an improvement. Thanks, Benjamin
Nagios XI - Optimizing The PHP Settings File
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 194
- Joined: Wed Dec 23, 2020 10:15 pm
Re: how to turn off automatically delete file in temp folder
hi,
"Have you optimized the PHP settings on this server yet. If not, please go ahead and increase the memory, input variable, and execution time"
--> already increased like below but still facing error status when report schedule execute.
[root@dc-nagiosxi01 ~]# cat /etc/php.ini | grep max_input_vars
max_input_vars = 100000
[root@dc-nagiosxi01 ~]# cat /etc/php.ini | grep memory_limit
memory_limit = 10240M
[root@dc-nagiosxi01 ~]# cat /etc/php.ini | grep max_execution_time
max_execution_time = 1200
"On the first question, I'm pretty sure that option is set in the code, but I'll follow up with the developer to see if there are any changes to the configuration files that would change that behavior."
--> yes pls, we need file just for daily report asap.
If unable to do that, is there anyway for get all hosts report in ONE email only, and minimize file size (pdf file)?
Now we have about 60 hosts and we need receive Performance graphs report for daily, but now nagios only support send report on everyhost, and file size about upto 4MB per host. So that's why i need get temp file in /usr/local/nagiosxi/tmp for compress and send email using crontab.
Any suggest for us in this case?
thank you.
"Have you optimized the PHP settings on this server yet. If not, please go ahead and increase the memory, input variable, and execution time"
--> already increased like below but still facing error status when report schedule execute.
[root@dc-nagiosxi01 ~]# cat /etc/php.ini | grep max_input_vars
max_input_vars = 100000
[root@dc-nagiosxi01 ~]# cat /etc/php.ini | grep memory_limit
memory_limit = 10240M
[root@dc-nagiosxi01 ~]# cat /etc/php.ini | grep max_execution_time
max_execution_time = 1200
"On the first question, I'm pretty sure that option is set in the code, but I'll follow up with the developer to see if there are any changes to the configuration files that would change that behavior."
--> yes pls, we need file just for daily report asap.
If unable to do that, is there anyway for get all hosts report in ONE email only, and minimize file size (pdf file)?
Now we have about 60 hosts and we need receive Performance graphs report for daily, but now nagios only support send report on everyhost, and file size about upto 4MB per host. So that's why i need get temp file in /usr/local/nagiosxi/tmp for compress and send email using crontab.
Any suggest for us in this case?
thank you.
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: how to turn off automatically delete file in temp folder
Hi,
Regarding the status error, what version of Nagios XI are you currently using, and what operating system (vendor and version)? We're testing this right now and have not been able to replicate the error consistently.
Also, please post the output to the log below?
Regarding the other question, it's not currently possible to edit the reporting scripts since they are protected by source guardian. One option would be to stagger the schedule reports to minimize the performance impact. It's also possible to export the performance graph data itself using the REST API.
We are planning to re-work the report engine in the next major release (coming soon!) for more flexibility.
Regarding the status error, what version of Nagios XI are you currently using, and what operating system (vendor and version)? We're testing this right now and have not been able to replicate the error consistently.
Also, please post the output to the log below?
Code: Select all
cat /usr/local/nagiosxi/var/wkhtmltox.log
We are planning to re-work the report engine in the next major release (coming soon!) for more flexibility.
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: how to turn off automatically delete file in temp folder
Hi,
Can you post the output to the following log as well?
Thanks,
Benjamin
Can you post the output to the following log as well?
Code: Select all
/usr/local/nagiosxi/var/scheduledreporting.log
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 194
- Joined: Wed Dec 23, 2020 10:15 pm
Re: how to turn off automatically delete file in temp folder
[root@dc-nagiosxi01 ~]# cat /usr/local/nagiosxi/var/wkhtmltox.log
/usr/bin/wkhtmltopdf --javascript-delay 1000 --no-stop-slow-scripts --lowquality --no-outline --footer-spacing 3 --margin-bottom 15mm --footer-font-size 9 --footer-right "Page [page] of [toPage]" --footer-left "2021-03-04 16:17:06" -O landscape 'http://localhost/nagiosxi/includes/comp ... r_compat=1' '/usr/local/nagiosxi/tmp/exportreport-hangltt-6040a59269dbc'
Loading pages (1/6)
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done
[root@dc-nagiosxi01 ~]#
Attach file is tail -500 rows of schedule report log.
"Regarding the other question, it's not currently possible to edit the reporting scripts since they are protected by source guardian. One option would be to stagger the schedule reports to minimize the performance impact. It's also possible to export the performance graph data itself using the REST API."
--> can you explain more? or any document?
/usr/bin/wkhtmltopdf --javascript-delay 1000 --no-stop-slow-scripts --lowquality --no-outline --footer-spacing 3 --margin-bottom 15mm --footer-font-size 9 --footer-right "Page [page] of [toPage]" --footer-left "2021-03-04 16:17:06" -O landscape 'http://localhost/nagiosxi/includes/comp ... r_compat=1' '/usr/local/nagiosxi/tmp/exportreport-hangltt-6040a59269dbc'
Loading pages (1/6)
Counting pages (2/6)
Resolving links (4/6)
Loading headers and footers (5/6)
Printing pages (6/6)
Done
[root@dc-nagiosxi01 ~]#
Attach file is tail -500 rows of schedule report log.
"Regarding the other question, it's not currently possible to edit the reporting scripts since they are protected by source guardian. One option would be to stagger the schedule reports to minimize the performance impact. It's also possible to export the performance graph data itself using the REST API."
--> can you explain more? or any document?
You do not have the required permissions to view the files attached to this post.
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: how to turn off automatically delete file in temp folder
Hi,
Great, thank you. What version of Nagios XI are you using and the OS? We noticed that the wkhtmltox.log is not being updated (last entry was 2021-03-04 16:17:06 ), so let's check the permissions on that file.
They should be set as follows.
Also, please post the output to the following command to check the version of wkhtmltopdf on this server.
The API commands are fully documented in the interface at Help > API Docs (See API - Objects Reference). Also, can you PM a fresh system profile?
To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Great, thank you. What version of Nagios XI are you using and the OS? We noticed that the wkhtmltox.log is not being updated (last entry was 2021-03-04 16:17:06 ), so let's check the permissions on that file.
Code: Select all
ls -l /usr/local/nagiosxi/var/wkhtmltox.log
Code: Select all
chown nagios.nagios /usr/local/nagiosxi/var/wkhtmltox.log
chmod 666 /usr/local/nagiosxi/var/wkhtmltox.log
Code: Select all
/usr/bin/wkhtmltopdf -V
To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 194
- Joined: Wed Dec 23, 2020 10:15 pm
Re: how to turn off automatically delete file in temp folder
OS : redhat 7.
nagios xi : 5.8.1
[root@dc-nagiosxi01 ~]# /usr/bin/wkhtmltopdf -V
wkhtmltopdf 0.12.1.3 (with patched qt)
pls check you inbox. already pm the profile.
thanks
nagios xi : 5.8.1
[root@dc-nagiosxi01 ~]# /usr/bin/wkhtmltopdf -V
wkhtmltopdf 0.12.1.3 (with patched qt)
pls check you inbox. already pm the profile.
thanks
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: how to turn off automatically delete file in temp folder
Hi @sacom01,
Got the profile, thank you. I'm able to repeat the error consistently if I have the program URL set to the wrong address in the system settings. (Also, try using the IP address instead of the FQDN). Please go to Admin > System Config > System Settings, and make sure this is set correctly.
Also, open up the following file.
And change this line.
To this.
Then test once more. If it fails again, please run the following command from the CLI and post the output.
Got the profile, thank you. I'm able to repeat the error consistently if I have the program URL set to the wrong address in the system settings. (Also, try using the IP address instead of the FQDN). Please go to Admin > System Config > System Settings, and make sure this is set correctly.
Also, open up the following file.
Code: Select all
vi /usr/local/nagiosxi/html/config.inc.php
Code: Select all
// Force http/https
$cfg['use_https'] = false; // determines whether cron jobs and other scripts will force the use of HTTPS instead of HTTP
Code: Select all
// Force http/https
$cfg['use_https'] = true; // determines whether cron jobs and other scripts will force the use of HTTPS instead of HTTP
Code: Select all
wget --no-check-certificate -O "/usr/local/nagiosxi/tmp/scheduledreport-nagiosadmin-WXdkhWaHFGKM-1623859806-Availability_Report.pdf" 'https://<IPADDRESS>/nagiosxi//reports/availability.php?reportperiod=last24hours&startdate=&enddate=&host=&service=&hostgroup=&servicegroup=&advanced=0&assumeinitialstates=yes&assumestateretention=yes&assumestatesduringdowntime=yes&includesoftstates=no&assumedhoststate=3&assumedservicestate=6&timeperiod=&locale=&mode=pdf&token=eb19b3f1e96c883fdc501586084b9b9b11792f65'
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!
Be sure to check out our Knowledgebase for helpful articles and solutions!