howardjones / network-weathermap

Network Weathermap draws diagrams from data
http://www.network-weathermap.com/
MIT License
425 stars 94 forks source link

Minor issue: Cacti Log incorrectly displays file path for Weathermap warn msgs #97

Closed ikorzha closed 7 years ago

ikorzha commented 7 years ago

Minor issue: Cacti Log incorrectly displays file path for Weathermap warn msgs Path is broken up: RRD ReadData: poller_output: /jc_b2b-vpn_5525_sec_snmp_oid_33106.rrd is not a valid RRD filename within this Cacti install. is /var/www/html/rra [WMRRD08]

Please see screenshot below: Cacti Version 0.8.8g Cacti OS 6.9 PHP Version 5.3.3 SNMP Version NET-SNMP version: 5.5 RRDTool Version RRDTool 1.3.x

log

howardjones commented 7 years ago

I'm not sure which part of this is incorrect - are you saying the file does exist? or that the rra path is wrong, or just the formatting?

The reason the formatting is like that is because that's how cacti stores pathnames in its database, which is what we care about when using poller_output mode.

mysql> select id,local_data_id, data_source_path from data_template_data where data_source_path is not null;
+----+---------------+----------------------------------------+
| id | local_data_id | data_source_path                       |
+----+---------------+----------------------------------------+
| 62 |             3 | <path_rra>/localhost_mem_buffers_3.rrd |
| 63 |             4 | <path_rra>/localhost_mem_swap_4.rrd    |
| 64 |             5 | <path_rra>/localhost_load_1min_5.rrd   |
| 65 |             6 | <path_rra>/localhost_users_6.rrd       |
| 66 |             7 | <path_rra>/localhost_proc_7.rrd        |
+----+---------------+----------------------------------------+
ikorzha commented 7 years ago

RRA Path is wrong in log.. Then it is is a non issue based on your explanation.

ikorzha commented 7 years ago

RRA Path is wrong in log.. Then it is is a non issue based on your explanation.

howardjones commented 7 years ago

No, it's not! If it's getting the incorrect, it won't find poller data... are you getting data for that map OK?

ikorzha commented 7 years ago

Yes Howie map does function properly, the WARN msgs are for files that "do not exist" so msgs are correct. My concern was that instead of: RRD ReadData: poller_output: /jc_b2b-vpn_5525_sec_snmp_oid_33106.rrd is not a valid RRD filename within this Cacti install. is /var/www/html/rra [WMRRD08]

It should be: RRD ReadData: poller_output: /var/www/html/rra/jc_b2b-vpn_5525_sec_snmp_oid_33106.rrd is not a valid RRD filename within this Cacti install. [WMRRD08]

Current implementation makes it more difficult to read file path, therefore I wanted to simplify log reading the way it was functioning previously. If you can correct it please do, if not close the case.

howardjones commented 7 years ago

OK, then I'll leave it as is. It is written that way to make it easier to faultfind :-) (you can tell what was in the database, and what comes from the cacti config).

howardjones commented 7 years ago

(the important point is that Weathermap is not actually looking for the file on disk, just to match the name you used in the TARGET with an entry in the cacti database)