LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   have a graph on centreon (https://www.linuxquestions.org/questions/linux-newbie-8/have-a-graph-on-centreon-4175458871/)

tissam89 04-20-2013 04:54 AM

have a graph on centreon
 
Hi,

I want to have graphs . I have two services for my router, ping and check-interface-table .

I can see the graph for ping on centreon, but not for check-interface-table . ( No buton for seing graph next to my check-interface-rable service)


I installed pnp4nagios but it doesn't work properly . when i try to vieuw a graph for a interface , I have this error :

Code:

Please check the documentation for information about the following error.
perfdata directory "/usr/local/pnp4nagios/var/perfdata/Switch1" for host "Switch1" does not exist. Read FAQ online
file [line]:
application/models/data.php [148]:
back

when I try verify the config , It say I didn't define the command , but I did
Code:

# perl verify_pnp_config --mode bulk --config=/etc/nagios/nagios.cfg --pnpcfg=/usr/local/pnp4nagios/etc
[INFO]  ========== Starting Environment Checks ============
[INFO]  My version is: verify_pnp_config-0.6.21-R.40
[INFO]  Start Options: verify_pnp_config --mode bulk --config=/etc/nagios/nagios.cfg --pnpcfg=/usr/local/pnp4nagios/etc
[INFO]  Reading /etc/nagios/nagios.cfg
[OK  ]  Running product is 'nagios'
[OK  ]  object_cache_file is defined
[OK  ]  object_cache_file=/etc/nagios/objects/objects.cache
[INFO]  Reading /etc/nagios/objects/objects.cache
[OK  ]  resource_file is defined
[OK  ]  resource_file=/etc/nagios/resource.cfg
[INFO]  Reading /etc/nagios/resource.cfg
[INFO]  Reading /usr/local/pnp4nagios/etc/process_perfdata.cfg
[INFO]  Reading /usr/local/pnp4nagios/etc/pnp4nagios_release
[OK  ]  Found PNP4Nagios version "0.6.21"
[OK  ]  ./configure Options '--with-nagios-user=nagios'
[OK  ]  Effective User is 'nagios'
[OK  ]  User nagios exists with ID '104'
[OK  ]  Effective group is 'nagios'
[OK  ]  Group nagios exists with ID '179'
[INFO]  ========== Checking Bulk Mode Config  ============
[OK  ]  process_performance_data is 1 compared with '/1/'
[OK  ]  service_perfdata_file is defined
[OK  ]  service_perfdata_file=/usr/local/pnp4nagios/var/service-perfdata
[OK  ]  service_perfdata_file_template is defined
[OK  ]  service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$
[OK  ]  PERFDATA template looks good
[OK  ]  service_perfdata_file_mode is defined
[OK  ]  service_perfdata_file_mode=a
[OK  ]  service_perfdata_file_processing_interval is defined
[OK  ]  service_perfdata_file_processing_interval=15
[OK  ]  service_perfdata_file_processing_command is defined
[OK  ]  service_perfdata_file_processing_command=process-service-perfdata-file
[OK  ]  host_perfdata_file is defined
[OK  ]  host_perfdata_file=/usr/local/pnp4nagios/var/host-perfdata
[OK  ]  host_perfdata_file_template is defined
[OK  ]  host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$
[OK  ]  PERFDATA template looks good
[OK  ]  host_perfdata_file_mode is defined
[OK  ]  host_perfdata_file_mode=a
[OK  ]  host_perfdata_file_processing_interval is defined
[OK  ]  host_perfdata_file_processing_interval=15
[OK  ]  host_perfdata_file_processing_command is defined
[OK  ]  host_perfdata_file_processing_command=process-host-perfdata-file
[INFO]  Nagios config looks good so far[INFO]  ========== Checking config values ============
service_perfdata_file_processing_command at verify_pnp_config line 462.

[CRIT]  Command process-service-perfdata-file is not defined

those are the commands on my /etc/nagios/checkcommands.cfg file :

Code:

define command{
        command_name                    process-host-perfdata-file
        command_line                    /usr/local/pnp4nagios/libexec/process_perfdata.pl --bulk=/$
}
define command{
        command_name                    process-service-perfdata-file
        command_line                    /usr/local/pnp4nagios/libexec/process_perfdata.pl --bulk=/$
}

on my /etc/nagios/serviceTemplates.cfg file :

Code:

define service{
        name                            srv-pnp
        service_description            srv-pnp
        register                                0
        action_url                      /pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$
}

and /etc/nagios/hostTemplates.cfg
:
Code:

define host{
        name                            host-pnp
        alias                          host-pnp
        register                                0
        action_url                      /pnp4nagios/graph?host=$HOSTNAME$&srv=_HOST_
}


TB0ne 04-20-2013 02:32 PM

Quote:

Originally Posted by tissam89 (Post 4935205)
Hi,
I want to have graphs . I have two services for my router, ping and check-interface-table. I can see the graph for ping on centreon, but not for check-interface-table . ( No buton for seing graph next to my check-interface-rable service) I installed pnp4nagios but it doesn't work properly . when i try to vieuw a graph for a interface, I have this error:
Code:

Please check the documentation for information about the following error.
perfdata directory "/usr/local/pnp4nagios/var/perfdata/Switch1" for host "Switch1" does not exist. Read FAQ online
file [line]:
application/models/data.php [148]:
back


Ok...so:
  • Did you read the FAQ online as it told you?
  • Did you verify the directory exists? It's telling you above it doesn't.
  • What are the permissions on that directory, if it does exist?
The FAQ addresses reasons this happens:
http://docs.pnp4nagios.org/faq/5?s[]=does%20not%20exist

From the FAQ:
Quote:

Originally Posted by PNP FAQ
If this directory does not exist there are several possible causes:
  • Passing an incorrect host name in the URL
  • The host has no valid performance data
  • None of the services has valid performance data

Have you checked all three of the reasons listed above???

tissam89 04-21-2013 06:32 AM

Thank you for your answer !!

The problem is when i try to get the graph, it looks for the perfdata of the host here :
usr/local/pnp4nagios/var/perfdata/IP@

But the real path is :

usr/local/pnp4nagios/var/perfdata/Name

How can I resolve it ? which file should I edit.

TB0ne 04-21-2013 10:07 AM

Quote:

Originally Posted by tissam89 (Post 4935740)
Thank you for your answer !!
The problem is when i try to get the graph, it looks for the perfdata of the host here: usr/local/pnp4nagios/var/perfdata/IP@

But the real path is: usr/local/pnp4nagios/var/perfdata/Name

How can I resolve it ? which file should I edit.

You can resolve it by reading and following the configuration instructions for PNP.
http://docs.pnp4nagios.org/pnp-0.6/config

The instructions for PNP are very clear, and aren't like what you posted here. If you don't follow the instructions, things won't work. This is much the same as you've been told in many of your other threads.

tissam89 04-21-2013 12:54 PM

Quote:

Originally Posted by TB0ne (Post 4935825)
You can resolve it by reading and following the configuration instructions for PNP.
http://docs.pnp4nagios.org/pnp-0.6/config

The instructions for PNP are very clear, and aren't like what you posted here. If you don't follow the instructions, things won't work. This is much the same as you've been told in many of your other threads.

Thank you so much for your replies .
I followed the instrcutions :D . The issue was on the space . I didn't have enought space on me /usr directory

TB0ne 04-21-2013 02:00 PM

Quote:

Originally Posted by tissam89 (Post 4935899)
Thank you so much for your replies .
I followed the instrcutions :D . The issue was on the space . I didn't have enought space on me /usr directory

I find that hard to believe, since no where did you mention space issues before. Also, you'd have had MANY other things failing if the /usr (and ostensibly the / partition) didn't have enough space on it, especially for such small files.

tissam89 04-21-2013 02:07 PM

Quote:

Originally Posted by TB0ne (Post 4935932)
I find that hard to believe, since no where did you mention space issues before. Also, you'd have had MANY other things failing if the /usr (and ostensibly the / partition) didn't have enough space on it, especially for such small files.

I am on a virtual machine , and i have only 4 go on my /usr repository . I work on 25 equipements, so when pnp4nagios start creating .xml and .rdd files for evry interface of every equipement , it had no enought space to create the informations needed for all interfaces .

I couldn't open the centreon page too when I had no free space.but when i got more space, everyThing worked :)

Hope you believe it .

TB0ne 04-21-2013 04:16 PM

Quote:

Originally Posted by tissam89 (Post 4935936)
I am on a virtual machine , and i have only 4 go on my /usr repository . I work on 25 equipements, so when pnp4nagios start creating .xml and .rdd files for evry interface of every equipement , it had no enought space to create the informations needed for all interfaces .

I couldn't open the centreon page too when I had no free space.but when i got more space, everyThing worked :)
Hope you believe it .

No, sorry. .rrd and .xml files are very small. 4 GB is MORE than enough for /usr, especially since you had no other system issues. Glad its working for you.


All times are GMT -5. The time now is 05:58 PM.