So we recently moved monitor servers- I copied all config files, definitions, rrd files, installed nagiosgraph etc. I mirrored everything exactly and nagios works perfectly except for the fact that I cannot create new rrd files (from cmd line is fine). It still updates the old ones and I can see the updated graphs so I know it is not a permission/filesystem issue- been pulling my hair out all day. I'm guessing its related to performance processing- the template is fine but the log file says there is no performance data to compare to (below)
-all config files copied from old server
-checked for spelling mistakes
-tried debug/verbose log. no errors
-rrdtool create works fine from cmd line. no permission issue. but no rrdtool create appears in log file
-checked all directories for permission. all nagios:nagios
!1590 # grep perf /etc/nagios/nagios.cfg
perfdata_timeout=5
process_performance_data=1
service_perfdata_file=/dev/shm/service-perfdata
service_perfdata_file_mode=a
service_perfdata_file_template=$HOSTNAME$\t$SERVICEDESC$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$\t$TIMET$
service_perfdata_file_processing_command=process-service-perfdata-file
service_perfdata_file_processing_interval=60
!1591 # grep perf /etc/nagios/grapher.ncfg
perffile_path /dev/shm
rrdpath /export/data/nagios/perfdata/
!1592 # grep -r perfdata /etc/nagios/objects/
/etc/nagios/objects/commands/process-perfdata.cfg: command_name process-host-perfdata
/etc/nagios/objects/commands/process-perfdata.cfg: command_line /usr/bin/printf "%b" "$LASTHOSTCHECK$\t$HOSTNAME$\t$HOSTSTATE$\t$HOSTATTEMPT$\t$HOSTSTATETYPE$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$\n" >> /var/log/nagios/host-perfdata.out
/etc/nagios/objects/commands/process-perfdata.cfg: command_name process-service-perfdata
/etc/nagios/objects/commands/process-perfdata.cfg: command_name process-service-perfdata-file
/etc/nagios/objects/commands/process-perfdata.cfg: command_line mv /dev/shm/service-perfdata /dev/shm/service-perfdata.$TIMET$
Grapher log:
2520353:2011-03-01 19:52:01 PIPE: NYCadvip3 ads_SMART_NYCadvip3 Result: HTTP/1.1 200 OK in 37 ms 1299027060
2520454:2011-03-01 19:52:01 REGEX: 1 blocks for 'ads_SMART_NYCadvip3' found.
2520523-2011-03-01 19:52:01 REGEX: graph_value=ads_smart_value
2520578-2011-03-01 19:52:01 REGEX: output=perfdata
2520621-2011-03-01 19:52:01 REGEX: regex=m/(\d+)/i
2520664-2011-03-01 19:52:01 REGEX: perfdata=
2520701-2011-03-01 19:52:01 REGEX: NO MATCH.
2520738:2011-03-01 19:52:01 VALUES: [NYCadvip3][ads_SMART_NYCadvip3]:No matching perfdata values found...
define service{
service_description ads_SMART_NYCadvip3
check_command ads_SMART_NYCadvip3
host_name NYCadvip3
max_check_attempts 3
normal_check_interval 2
retry_check_interval 1
check_period 24x7
notification_interval 0
notification_period 24x7
notification_options w,c,r
process_perf_data 1
contact_groups unix-admins
}
define ngraph{
service_name ads_SMART_NYCadvip3
graph_perf_regex (\d+)
graph_value ads_smart_value
graph_units Seconds
graph_logarithmic 1
graph_legend "text here:"
graph_legend_max 25
graph_legend_eol none
rrd_plottype AREA
rrd_color c0c0ff
}
more of the template here
...
...
Unable to create nagiosgraph rrd files- can update fine
Re: Unable to create nagiosgraph rrd files- can update fine
FYI- same version of nagios on both. 3.0.2
Nagiosgrapher 1.6.1
Nagiosgrapher 1.6.1
Re: Unable to create nagiosgraph rrd files- can update fine
Update- the problem only occurs on one check:
why is there no perfdata?? the regex matches:
6180547:2011-03-02 13:51:32 PIPE: NYCadvip3 ads_SMART_NYCadvip3 Result: HTTP/1.1 200 OK in time=34 ms 1299091868
6180653:2011-03-02 13:51:32 REGEX: 1 blocks for 'ads_SMART_NYCadvip3' found.
6180722-2011-03-02 13:51:32 REGEX: graph_value=ads_smart_value
6180777-2011-03-02 13:51:32 REGEX: output=perfdata
6180820-2011-03-02 13:51:32 REGEX: regex=m/time=(\d+)/i
6180868-2011-03-02 13:51:32 REGEX: perfdata=
6180905-2011-03-02 13:51:32 REGEX: NO MATCH.
#changed the regex slightly but still does not work
define ngraph{
service_name ads_SMART_NYCadvip3
graph_perf_regex time=(\d+)
graph_value ads_smart_value
graph_units Seconds
graph_logarithmic 1
graph_legend "MySQL port response:"
graph_legend_max 25
graph_legend_eol none
rrd_plottype AREA
rrd_color c0c0ff
why is there no perfdata?? the regex matches:
6180547:2011-03-02 13:51:32 PIPE: NYCadvip3 ads_SMART_NYCadvip3 Result: HTTP/1.1 200 OK in time=34 ms 1299091868
6180653:2011-03-02 13:51:32 REGEX: 1 blocks for 'ads_SMART_NYCadvip3' found.
6180722-2011-03-02 13:51:32 REGEX: graph_value=ads_smart_value
6180777-2011-03-02 13:51:32 REGEX: output=perfdata
6180820-2011-03-02 13:51:32 REGEX: regex=m/time=(\d+)/i
6180868-2011-03-02 13:51:32 REGEX: perfdata=
6180905-2011-03-02 13:51:32 REGEX: NO MATCH.
#changed the regex slightly but still does not work
define ngraph{
service_name ads_SMART_NYCadvip3
graph_perf_regex time=(\d+)
graph_value ads_smart_value
graph_units Seconds
graph_logarithmic 1
graph_legend "MySQL port response:"
graph_legend_max 25
graph_legend_eol none
rrd_plottype AREA
rrd_color c0c0ff
Re: Unable to create nagiosgraph rrd files- can update fine
solved!!!
http://sourceforge.net/projects/nagiosg ... ic/3923279
one more thing. performance data should have this format: name1=value[units];[warn];[crit];[min];[max][ name2=value[units];[warn];[crit];[min];[max][ ...]]]
http://sourceforge.net/projects/nagiosg ... ic/3923279
one more thing. performance data should have this format: name1=value[units];[warn];[crit];[min];[max][ name2=value[units];[warn];[crit];[min];[max][ ...]]]