/NAGIOS/CGI-BIN/CMD.CGI cannot open

Source: Internet
Author: User

Tag: Command update error file null

Cause analysis, Nginx does not support post.

Workaround, Recompile Nagios

1, VI/NAGIOS-4.0.8/CGI/CMD.C

Find printf ("<form method= 'post' action= '%s ' >\n", command_cgi);

Post modified to get

2, re-make, do not need to install

Copy the new cmd.cgi to replace the old

CP nagios-4.0.8/cgi/cmd.cgi/usr/local/nagios/sbin/cmd.cgi

3.error:could not open command file '/usr/local/nagios/var/rw/nagios.cmd ' for update!, with this error message, after searching, get the answer:Http://blog.sina.com.cn/s/blog_6eee530801010ade.html
Modify the Nagios startup script/etc/init.d/nagios

start)
echo-n "Starting Nagios:"
$NagiosBin-v $NagiosCfgFile >/dev/null 2>&1;
if [$?-eq 0]; Then
su-$NagiosUser-C "Touch $NagiosVarDir/nagios.log $NagiosRetentionFile"
rm-f $NagiosCommandFile
Touch $NagiosRunFile
chown $NagiosUser: $NagiosGroup $NagiosRunFile
$NagiosBin-D $NagiosCfgFile
if [-D $NagiosLockDir]; then touch $NagiosLockDir/$NagiosLockFile; fi
echo "done."
chmod-r 777 $NagiosVarDir/RW----added this sentence
Exit 0

This article is from the "Linux related sharing" blog, make sure to keep this source http://2860664.blog.51cto.com/2850664/1571716

/NAGIOS/CGI-BIN/CMD.CGI cannot open

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.