We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, first of all thanks a lot for making flat, it's exactly what I was looking for.
I think I might have found an issue. When being passed this object:
{ filename: '/Users/kevin/metriks/rrds/nslookup/kvz-imac-home-4.local-nslookup.rrd', rrd_version: '0003', step: 300, last_update: 1392592863, header_size: 1832, 'ds.8_8_8_8.index': 0, 'ds.8_8_8_8.type': 'GAUGE', 'ds.8_8_8_8.minimal_heartbeat': 600, 'ds.8_8_8_8.min': 'NaN', 'ds.8_8_8_8.max': 'NaN', 'ds.8_8_8_8.last_ds': '19', 'ds.8_8_8_8.value': 209, 'ds.8_8_8_8.unknown_sec': 52, 'ds.8_8_4_4.index': 1, 'ds.8_8_4_4.type': 'GAUGE', 'ds.8_8_4_4.minimal_heartbeat': 600, 'ds.8_8_4_4.min': 'NaN', 'ds.8_8_4_4.max': 'NaN', 'ds.8_8_4_4.last_ds': '20', 'ds.8_8_4_4.value': 220, 'ds.8_8_4_4.unknown_sec': 52, 'ds.4_2_2_2.index': 2, 'ds.4_2_2_2.type': 'GAUGE', 'ds.4_2_2_2.minimal_heartbeat': 600, 'ds.4_2_2_2.min': 'NaN', 'ds.4_2_2_2.max': 'NaN', 'ds.4_2_2_2.last_ds': '122', 'ds.4_2_2_2.value': 1342, 'ds.4_2_2_2.unknown_sec': 52, 'ds.208_67_222_222.index': 3, 'ds.208_67_222_222.type': 'GAUGE', 'ds.208_67_222_222.minimal_heartbeat': 600, 'ds.208_67_222_222.min': 'NaN', 'ds.208_67_222_222.max': 'NaN', 'ds.208_67_222_222.last_ds': '18', 'ds.208_67_222_222.value': 198, 'ds.208_67_222_222.unknown_sec': 52, 'ds.172_16_0_23.index': 4, 'ds.172_16_0_23.type': 'GAUGE', 'ds.172_16_0_23.minimal_heartbeat': 600, 'ds.172_16_0_23.min': 'NaN', 'ds.172_16_0_23.max': 'NaN', 'ds.172_16_0_23.last_ds': '-1', 'ds.172_16_0_23.value': -11, 'ds.172_16_0_23.unknown_sec': 52, 'rra.0.cf': 'AVERAGE', 'rra.0.rows': 300, 'rra.0.cur_row': 215, 'rra.0.pdp_per_row': 1, 'rra.0.xff': 0.5, 'rra.0.cdp_prep.0.value': 'NaN', 'rra.0.cdp_prep.0.unknown_datapoints': 0, 'rra.0.cdp_prep.1.value': 'NaN', 'rra.0.cdp_prep.1.unknown_datapoints': 0, 'rra.0.cdp_prep.2.value': 'NaN', 'rra.0.cdp_prep.2.unknown_datapoints': 0, 'rra.0.cdp_prep.3.value': 'NaN', 'rra.0.cdp_prep.3.unknown_datapoints': 0, 'rra.0.cdp_prep.4.value': 'NaN', 'rra.0.cdp_prep.4.unknown_datapoints': 0, '': '' }
The resulting unflattened structure looks like this:
unflatten
{ filename: '/Users/kevin/metriks/rrds/nslookup/kvz-imac-home-4.local-nslookup.rrd', rrd_version: '0003', step: 300, last_update: 1392592863, header_size: 1832, ds: [ , , , , [Object], , , , [Object], , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , [Object], , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , [Object] ], rra: [ [Object] ], '': '' }
My guess is that flat too eagerly tries to look for numbers in keys as it wants to forge arrays for those.
flat
Let me know if I'm overlooking something.
Best, Kevin
The text was updated successfully, but these errors were encountered:
Add nslookup. Research & prevent invalid ds-keynames
091e683
Leading to a bugreport here hughsk/flat#6
cd2c9cb
Ah thanks, good catch @kvz! Glad to hear flat was useful for you – have fixed this issue, the new version should be available at 1.2.0 :)
1.2.0
Sorry, something went wrong.
Fix flatten bug. Thanks @hughsk
30390d6
hughsk/flat#6 (comment)
Awesome, works as expected now. Thanks for the quick fix!
No branches or pull requests
Hi, first of all thanks a lot for making flat, it's exactly what I was looking for.
I think I might have found an issue. When being passed this object:
The resulting
unflatten
ed structure looks like this:My guess is that
flat
too eagerly tries to look for numbers in keys as it wants to forge arrays for those.Let me know if I'm overlooking something.
Best,
Kevin
The text was updated successfully, but these errors were encountered: