Solved

100% undetermined host for everyhosts

  • 15 September 2022
  • 16 replies
  • 418 views

Badge +2

Hi, as you can see on the screenshot above, I can’t have any informations about my hosts. I’ve followed the entire documentation of centreon and tried to fix the problems by testing a lot of differents solutions but the problem is still here... 

icon

Best answer by GuillaumeGanneval 16 September 2022, 09:48

View original

16 replies

Userlevel 4
Badge +13

Hi
Do you have some error in these log files?

  • /var/log/centreon/eventReportBuilder.log
  • /var/log/centreon/dashboardBuilder.log

Can you send the results of these 2 commands?

tail -f /var/log/centreon/eventReportBuilder.log
tail -f /var/log/centreon/dashboardBuilder.log

 

Badge +2

Hi, thank you for you’re fast answer

I don’t have any file called like that… 
I’m using CentOS 7 if this can help for something

Badge +2

I’m mean, the directory /var/log/centreon exist but the two files (eventReportBuilder.log and dashboardBuilder.log) doesn’t

Badge +2

 

Userlevel 4
Badge +13

The packages centreon-web deploys the files /etc/cron.d/centreon.

What is the content of this file?

cat /etc/cron.d/centreon

You should have many lines whose these ones:

############################
# Cron to build state events
0 3 * * * centreon /usr/share/centreon/cron/eventReportBuilder --config=/etc/centreon/conf.pm >> /var/log/centreon/eventReportBuilder.log 2>&1

##########################
# Cron to build reporting
0 6 * * * centreon /usr/share/centreon/cron/dashboardBuilder --config=/etc/centreon/conf.pm >> /var/log/centreon/dashboardBuilder.log 2>&1

Badge +2

Ok, I see the path for the two files but when I use tail -f it says that there is no such files.

Badge +2

 

Badge +2

 

Badge +2

[root@central 1# cat /etc/cron.d/centreon

 

Cron Configuration for Centreon

 

PATH=/sbin:/bin:/usr/sbin:/usr/bin

 

#rewrite file with new cron line CRONTAB EXEC_USER=""

 

#Cron for CentACL

 

apache /usr/bin/php -q /usr/share/centreon/cron/centAcl.php >> /var/log/centreon/centAcl.log 2>&1

 

#Cron for Centreon-Downtime

 

/5

 

apache /usr/bin/php -q /usr/share/centreon/cron/downtimeManager.php >> /var/log/centreon/downtimeManager.log 2>&1

 

#Cron to build state events

 

83 centreon /usr/share/centreon/cron/eventReportBuilder --config=/etc/centreon/conf.pm >> /var/log/centreon/event ReportBuilder.log 2>81

 

# Cron to build reporting 86 centreon /usr/share/centreon/cron/dashboardBuilder --config=/etc/centreon/conf.pm >> /var/log/centreon/dashboardBuilder.log 2>81

 

#Cron for knowledge base /5 centreon /usr/bin/php -q /usr/share/centreon/cron/centKnowledgeSynchronizer.php >> /var/log/centreon/knowledgebase. log 2>&1

 

#Cron for statistics 51 28 centreon /usr/bin/php -q /usr/share/centreon/cron/centreon-send-stats.php >> /var/log/centreon/statistics. log 2>&1

 

#Cron for Centreon-Backup

 

38 3 root /usr/share/centreon/cron/centreon-backup.pl >> /var/log/centreon/centreon-backup.log 2>&1

 

[root@central 1 tailf /var/log/centreon/event ReportBuilder.log

 

tailf: échec de stat /var/log/centreon/event ReportBuilder.log: Aucun fichier ou dossier de ce type

 

 

Sorry, I’m french so it’s in french

Userlevel 4
Badge +13

It seems you put spaces in the file name.

Just to be sure, can you execute this command?

ls -lah /var/log/centreon/ | grep -Ei 'drw|event|dash' | grep -v gz

 

Badge +2

drwxrwxr-x.   3 centreon centreon   201 15 sept.   14:07  .

drwxr-xr-x.   13  root        root        4.0K 15 seot.    13:31 . .

Badge +2

drwxr-xr-x.   2 apache   apache    6    14 sept.   11:52   symfony  

Userlevel 4
Badge +13

Is the crond process started?

systemctl status crond

 

Userlevel 4
Badge +13

@GuillaumeGanneval 

did you add this host within the last 24 or 12 hrs?

🤔

 

 

Badge +2

@sduret Yes the process is started

 

@ponchoh Yes you’re right, I’ve added them yesterday in the centreon web monitoring platform

Badge +2

The hosts seems to be working now, I don’t know why, I’ve done nothing but everythings fine now.

 

Thanks for your supports

Reply