Frequently Asked Questions :
I. How to change the default password ?
Go to the Centreon web interface. Select Configuration >Users> nagiosadmin then you can change the password
Launch this command on the FAN server :
# htpasswd -c /etc/nagios/htpasswd.users nagiosadmin
II. I don’t receive mail notifications. How to configure Postfix ?
In this example, we going to configure Postfix for Relaying on FAN server.
To configure our Postfix server for relaying emails through smtp.example.com, we run :
# postconf -e 'relayhost = smtp.example.com' # postconf -e 'smtp_sasl_auth_enable = yes' # postconf -e 'smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd' # postconf -e 'smtp_sasl_security_options ='
Our username (nagios) and password (password) for smtp.example.com must be stored in /etc/postfix/sasl_passwd, therefore we do this:
# echo "smtp.example.com nagios:password" >> /etc/postfix/sasl_passwd
/etc/postfix/sasl_passwd must be owned by root, and none else should have read access to that file, so we do this:
# chown root:root /etc/postfix/sasl_passwd # chmod 600 /etc/postfix/sasl_passwd
Now we must convert /etc/postfix/sasl_passwd into a format that Postfix can read:
# postmap /etc/postfix/sasl_passwd
This will create the file /etc/postfix/sasl_passwd.db.
Change name from :
# echo "nagios firstname.lastname@example.org" > /etc/postfix/canonical # echo "canonical_maps = hash:/etc/postfix/canonical" >> /etc/postfix/main.cf
Now we must convert /etc/postfix/canonical into a format that Postfix can read:
# postmap /etc/postfix/canonical
All that is left to do is restart Postfix:
# /etc/init.d/postfix restart
III. How to up to date FAN ?
With this command
# yum update
IV. How to use Nagios, Centreon, Nareto, Nagvis ?
FAN is just a linux distribution which provides monitoring tools. The documentation of thoses tools is provide by the developpers and the community of each tool.
V. I found a bug, where should I report it ?
You can file a bug in the FAN bug tracking system. Open a ticket to describe the bug, provide a FAN version, the catégorie.
VI. It doesn’t work, what do I do ?
You have already read the documentations, search all Google results and it still doesn’t work ? You can ask a question on the forum (How to ask the smart way) or use IRC (channel #fullyautomatednagios) on Freenode
VII. How to make Nagvis working with Nagios collectors ?
The default configuration of Nagvis is set to work only with the central Nagios. You have to add a new backend for each Nagios collector. The “dbinstancename” option of /etc/nagios/nagvis.ini.php is corresponding to the “instance_name” option of /etc/nagios/ndomod.cfg.
Example of new backend in nagvis.ini.php :
[backend_ndomy_2] <---------------------- Backend name ; type of backend - MUST be set ;backendtype="ndomy" ; hostname for NDO-db ;dbhost="localhost" ; portname for NDO-db ;dbport=3306 ; database-name for NDO-db dbname="nagios" ; username for NDO-db ;dbuser="root" ; password for NDO-db dbpass="" ; prefix for tables in NDO-db ;dbprefix="nagios_" ; instace-name for tables in NDO-db dbinstancename="Nagios2" <--------------------- Instance name ; maximum delay of the NDO Database in Seconds ;maxtimewithoutupdate=180 ; path to the cgi-bin of this backend ;htmlcgi="/nagios/cgi-bin"
VIII. How to change sender in host-notify-by-sendmailhost and notify-by-sendmailservices commands ?
Modify FROM variable in /usr/lib/nagios/plugins/sendmailservices.pl and /usr/lib/nagios/plugins/sendmailhost.pl plugins :
my $FROM = 'email@example.com';
IX. How to backup my FAN server
The fan-backup script is available if you want backup your FAN server.
Install the fan-backup rpm :
# yum install fan-backup
To backup a FAN standonale, run
# /opt/fan_backup.pl -s
To get help, run :
# /opt/fan_backup.pl --help
To restore a backup files, run :
# cd /var/backup/XXXXXXXX_XXXXXX/ # rsync -ravcz centreon /etc # rsync -ravcz nagvis /etc # rsync -ravcz logos /usr/share/nagios/images/ # rsync -ravcz plugins /usr/lib/nagios/ # i386 arch or # rsync -ravcz plugins /usr/lib64/nagios/ # x86_64 arch # rsync -ravcz pages /var/www/dokuwiki/data/
To restore database :
# cd /var/backup/XXXXXXXX_XXXXXX/databases # zcat centreon2/centreon2.sql.gz | mysql centreon2 # zcat centreon2_storage/centreon2_storage.sql.gz | mysql centreon2_storage # zcat nagios/nagios.sql.gz | mysql nagios
X. I forgot my centreon password. How to restore nagiosadmin password ?
Change centreon password from console. The default login nagiosadmin/nagiosadmin
# mysql centreon2 mysql> update contact set contact_passwd='426d184e674e6c3020d38bde1d7ed35d' where contact_alias='nagiosadmin';
XI. How to configure distributed monitoring with a fan-standalone and fan-poller ?
This feature is available since FAN 2.4.
Connect to fan-standalone and run system-config-distributed-monitoring script :
# system-config-distributed-monitoring Choose an action to do (addpoller or configdatabase):configdatabase Give me the IP address of database server :127.0.0.1 Give me the root password of database server : [INFO] You must enable root user to login by ssh to database server "192.168.56.5" by ssh. If this is not the case, edit /etc/ssh/sshd_config on database server and add "PermitRootLogin yes" Do you want continu ? [y/n], default to [n]:y Stopping ndo2db: done. Starting ndo2db: done. Stopping Centcore Waiting for centcore to exit . done. Starting Centcore Stopping centreon data collector Collector : centstorage Waiting for centstorage to exit . done. Starting centstorage Collector : centstorage
Second, add poller fan-poller :
# system-config-distributed-monitoring addpoller
XII. I add hosts and services in Centreon, why I have nothing in the monitoring view
You have to export your configuration, go to
- Configuration > Monitoring Engines > Generate
- Select a poller
- Check “Move Export Files” and “Restart Monitoring Engine”
- Click on Export
XIII. How to install FAN on Vmware Workstation 9 ?
If after the installation, You met “init x respawning too fast disabled 5 minutes”. You have to re-install FAN :
- Create a virtual machine
- chek “I will install the operating system later”
- Boot on FAN iso and run the installation
Comments are closed.