User Tools

Site Tools


monitoring:nrpe_install

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
monitoring:nrpe_install [2021/01/01 21:25]
127.0.0.1 external edit
monitoring:nrpe_install [2023/11/18 16:13] (current)
manu [Compile NRPE for AIX]
Line 1: Line 1:
-===== NRPE installation and configuration =====+====== NRPE installation and configuration ​======
  
 First install NRPE on the Nagios server and on the client to monitor. First install NRPE on the Nagios server and on the client to monitor.
Line 79: Line 79:
 # /​etc/​rc.d/​init.d/​nagios reload # /​etc/​rc.d/​init.d/​nagios reload
 </​cli>​ </​cli>​
 +
 +===== Compile NRPE for AIX =====
 +
 +On AIX binary files or RPM start NRPE as root
 +
 +To change it, recompile **nrpe.c**
 +
 +Get latest source from github, and modify using the followin paragraph, starting line 2587 on version 4.1.0
 +
 +<​code>​
 +#endif
 +/* Last Modified: 2022-07-18 line 2587 */
 +
 +                        if (full_drop) {
 +                                /​*setuid(uid) doesn’t work on aix but doesn’t return -1 either*/
 +                                if (setuid(uid) == -1) 
 +                                        logit(LOG_ERR,​ "​Warning:​ Could not set UID=%d",​ (int)uid);
 +                                /​*setuid(uid) returned anything but -1*/
 +                                else 
 +                                        /*if the current uid still isn’t geteuid() setuid failed and thus we SETEUID(uid)*/​
 +                                        if (uid != geteuid()) ​
 +                                                if (SETEUID(uid) == -1)
 +                                                        logit(LOG_ERR,​ "​Warning:​ Could not set effective UID=%d",​ (int)uid);
 +
 +                        } else if (SETEUID(uid) == -1)
 +                                logit(LOG_ERR,​ "​Warning:​ Could not set effective UID=%d",​ (int)uid);
 +                }
 +</​code>​
monitoring/nrpe_install.1609532713.txt.gz · Last modified: 2021/01/01 21:25 by 127.0.0.1