Config Pandora FMS - CPNV-ES-MAS3-X/Pandora-Containerization GitHub Wiki
De base :
User: admin
Password : pandora
Modifié dans la console web : Edit my user
New Password : Pa$$w0rd
Confirm
Old : pandora
Activer options dans Management > Setup > General Setup
Activer le Console log et Audit log :
Location >
Console log : /var/log/php-fpm/error.log
Audit : /pandora_console/log/audit.log
Logs pandora :
/var/log/pandora$ sudo ls
pandora_agent.log pandora_server.error pandora_server.log pandora_snmptrap.log web_socket.log
#Logs propre - pandora_server.log
cpnv@pandorafms:/var/log/pandora$ sudo cat pandora_server.log
2023-11-20 16:15:21 pandora_server: pandorafms [V1] Pandora FMS Server 'pandorafms' Shutdown by signal
2023-11-20 16:16:05 pandora_ha: pandorafms [V1] Launching 7.0NG.772.1 231005
2023-11-20 16:16:05 pandora_ha: pandorafms [V1] Config options: Logfile at /var/log/pandora/pandora_server.log, Basepath is /etc/pandora/pandora_server.conf, Checksum is 0, Master is 1, SNMP Console is 0, Server Threshold at 5 sec, verbosity at 3, Alert Threshold at 60, ServerName is 'pandorafms'
2023-11-20 16:16:05 pandorafms [V1] Launching 7.0NG.772.1 231005
2023-11-20 16:16:05 pandorafms [V1] Config options: Logfile at /var/log/pandora/pandora_server.log, Basepath is /etc/pandora/pandora_server.conf, Checksum is 0, Master is 1, SNMP Console is 0, Server Threshold at 5 sec, verbosity at 3, Alert Threshold at 60, ServerName is 'pandorafms'
2023-11-20 16:16:05 pandorafms [V1] [*] Pandora FMS Enterprise module not available.
2023-11-20 16:16:05 pandora_server: pandorafms [V3] Smart queue enabled for the Pandora FMS DataServer.
2023-11-20 16:16:05 pandora_server: pandorafms [V1] [*] NetFlow daemon disabled.
2023-11-20 16:16:05 pandora_server: pandorafms [V1] [*] sFlow daemon disabled.
2023-11-20 16:16:06 pandorafms [V3] Warmup mode for unknown modules started.
2023-11-20 16:16:06 pandora_server: pandorafms [V3] Assuming default path for API url: http://127.0.0.1/pandora_console/include/api.php
2023-11-20 16:16:06 pandora_server: pandorafms [V1] Server pandorafms is the current master.
2023-11-20 16:16:07 pandora_ha: pandorafms [V1] Server pandorafms is the current master.
2023-11-20 16:17:01 pandorafms [V1] Server pandorafms is the current master.
Erreur dans les logs :
2023-11-20 16:30:31 DataServer: pandorafms [V3] Received invalid data '' from agent '1b2f6e2b80e837eefb050deb49edc8a50d0e1d062331403166da090d97e9aa76' module 'Network_Usage_Bytes' agent '1b2f6e2b80e837eefb050deb49edc8a50d0e1d062331403166da090d97e9aa76'.
Trouvé l'id dans manage de l'agent
Module supprimé, logs clean OK
Logs pandora :
/var/log/pandora$ sudo ls
pandora_agent.log pandora_server.error pandora_server.log pandora_snmptrap.log web_socket.log
cpnv@pandorafms:/etc/logrotate.d$ cat pandora_server
/var/log/pandora/pandora_server.log
/var/log/pandora/web_socket.log
/var/log/pandora/pandora_server.error {
su root apache
weekly
missingok
size 300000
rotate 3
maxage 90
compress
notifempty
copytruncate
create 660 pandora apache
}
/var/log/pandora/pandora_snmptrap.log {
su root apache
weekly
missingok
size 500000
rotate 1
maxage 30
notifempty
copytruncate
create 660 pandora apache
}
cpnv@pandorafms:/etc/logrotate.d$ cat pandora_agent
/var/log/pandora/pandora_agent.log {
su root apache
weekly
missingok
size 300000
rotate 3
maxage 90
compress
notifempty
copytruncate
}
cpnv@pandorafms:/etc/logrotate.d$
In the path /etc/logrotate.d/ you can create a file in order to rotate any log as
`(Path where you have the log){
weekly
missingok
size 5M
rotate 300
compress
notifempty
copytruncate
}`
## Logs pandora - so far
/var/log/pandora/pandora_agent.log
/var/log/pandora/pandora_server.error
/var/log/pandora/pandora_server.log
/var/log/pandora/pandora_snmptrap.log
/var/log/pandora/web_socket.log
# /etc/logrotate.d/pandora_server
/var/log/pandora/pandora_server.log
/var/log/pandora/web_socket.log
/var/log/pandora/pandora_server.error {
weekly
missingok
size 5M
rotate 300
compress
notifempty
copytruncate
}
/var/log/pandora/pandora_snmptrap.log {
weekly
missingok
size 5M
rotate 300
compress
notifempty
copytruncate
}
# /etc/logrotate.d/pandora_agent
/var/log/pandora/pandora_agent.log {
weekly
missingok
size 5M
rotate 300
compress
notifempty
copytruncate
}
Trouver l'ordre de boot des services, pour l'instant rien trouvé dans la doc officielle.
sudo systemctl <service> ?
## Commandes utilisés
systemctl list-units : to test
systemctl list-units -t service --full --all
Comparé les outputs avec Diffnow : https://www.diffnow.com/compare-clips
# Clean Diff
cpnv@pandorafms:~$ systemctl list-units -t service --full --all
UNIT
apache2.service
containerd.service
exim4.service
mysql.service
nfdump.service
[email protected]
pandora_agent_daemon.service
pandora_server.service
pandora_websocket_engine.service
php8.0-fpm.service
phpsessionclean.service
postfix.service
[email protected]
sendmail.service
snmpd.service
tentacle_serverd.service
# Raw Output
cpnv@pandorafms:~$ systemctl list-units -t service --full --all
UNIT --LOAD ACTIVE SUB DESCRIPTION
apache2.service loaded active running The Apache HTTP Server
containerd.service loaded active running containerd container runtime
exim4.service not-found inactive dead exim4.service
mysql.service loaded active running Percona Server
nfdump.service loaded active exited netflow capture daemon
[email protected] loaded active running netflow capture daemon, default instance
pandora_agent_daemon.service loaded active running Pandora FMS agent daemon
pandora_server.service loaded active running LSB: Pandora FMS Server startup script
pandora_websocket_engine.service loaded active running LSB: Pandora FMS Console websocket engine startup script
php8.0-fpm.service loaded active running The PHP 8.0 FastCGI Process Manager
phpsessionclean.service loaded inactive dead Clean php session files
postfix.service loaded active exited Postfix Mail Transport Agent
[email protected] loaded active running Postfix Mail Transport Agent (instance -)
sendmail.service not-found inactive dead sendmail.service
snmpd.service loaded active running Simple Network Management Protocol (SNMP) Daemon.
tentacle_serverd.service loaded active running LSB: Tentacle Server startup script
# Mettre partout
Time Zone : Europe/Zurich a set partout
tzselect
7 for Europe
47 for Switzerland
1 to Confirm Europe/Zurich
timedatectl
timedatectl list-timezones
timedatectl set-timezone Europe/Zurich