Summary of issues encountered during the deployment of Nagios NRDP plug-ins

Source: Internet
Author: User

Do you encounter the following issues during the Ubuntu 14.04 System Exploration deployment of the Nagios NRDP plugin?

Test the http:ip/nrdp/Submission results page, always report the following error:

<result><status>-1</status><message>bad COMMAND file</message></result>< Result><status>-1</status><message>bad CHECK RESULTS dir</message></result>

The "Bad COMMAND FILE" "RESULTS DIR" developer defined the two running error message, semantic solution deviation is very large, got two days still no clue, but only in reading plug-in source, respectively found the source of the location, Now write the function of the call to the source of the error message as two test scripts

test_file_exists.php <?php  $result =file_exists ("/var/lib/nagios3/spool/checkresults", "C"); Print $result. " \n\r ";?> test_tempnam.php <?php  $tmpname =tempnam ("/var/lib/nagios3/spool/checkresults "," C "); print $ Tmpname. " \n\r ";?>

In the Nagios www-data user identity execution, will return different results, plug-ins do not work the normal reason for this, please self-verification,!

Sudo-u nagios  test_tempnam.php sudo-u nagios  test_file_exists.phpsudo-u www-data  test_tempnam.php sudo- U www-data  test_file_exists.php

Finally, a temporary workaround is given to change the running user of the Apache service

Vim/etc/apache2/envvarsexport Apache_run_user=nagiosexport Apache_run_group=nagios

Last Test everything OK

Host detection Send results

Python send_nrdp.py–url=http://10.2.0.191/server/–token= "[Email protected]&d" –host=localhost–state=0–output= "OK OK"

Service Detection Send Results

Python send_nrdp.py–url=http://10.2.0.191/server/–token= "[Email protected]&d" –host=localhost–service=check_ disk_passive–state=0–output= "OK OK"

Summary of issues encountered during the deployment of Nagios NRDP plug-ins

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.