0

I am trying to read data collected from a server to an other server.

Reading Change a Munin server and keep the data seems show a way to do this.

  • exporting rrd database using rrdtool dump
  • importing rrd dump using rrdtool restore

Next I declare in the destination server the hostname list in /etc/munin/munin.conf

[server1]
   use_node_name yes
   update no

Now, I would like munin recreate the html pages and the graphs corresponding to the hostname list.
How to force recreation (without new data) ?

Update Even the index.html is not updated and does not include a link to server1

mpromonet
  • 124
  • 1
  • 12
  • Have you tried running munin-html and/or munin-graph with the --debug --stdout flags? Anything there to give a clue as to why the graphs aren't being regenerated. I've assumed that you're generating this stuff via cron jobs rather than using munin-cgi-graph and munin-cgi-html. – Paul Haldane Dec 02 '14 at 13:57
  • When I run munin-html and munin-graph --debug (with or without --nolazy)) it doesnot print anything related to the restored host data, but as soon as declare the address (and trun uptate to yes) html and graph are rebuilt. I don't find a way to force html and graph rebuilt. I also tried with cgi, it dosnot change anything index.html is not updated in order to include restored hosts. – mpromonet Dec 03 '14 at 09:34

2 Answers2

0

I find that removing the generated graphs is enough to cause the standard munin cron jobs to regenerate them (even if data hasn't changed).

Paul Haldane
  • 4,457
  • 1
  • 20
  • 31
  • That is probably the intended workflow: http://munin-monitoring.org/wiki/munin-graph _Note that RRDtool has a built-in logic that determines whether it is necessary to create a graph or not. If you think you're smarter than RRDtool, the switch --nolazy will force creating the graph_ – r_3 Dec 01 '14 at 16:21
0

I've found that moving the files to the correct directories is the easiest way to move the data. This should work between server of the same architecture.

RRD uses hardware formats for binary (numeric) values, so in some cases it is necessary to dump and reload the data. If you do need do this, you need to dump on the original server and load on the new server. Using a shared directory (NFS, SMB, or SSHFS) may make this simpler.

You will need to copy (replicate) the munin configuration so it knows which servers to generate files for. The userid munin runs as will need write access to the output directories as well as read access to data (RRD) files. Write access is required to gather new data. Ideally, all files and directories will be owned by the account that is being used to run munin.

I would test with data for one server. I believe munin-graph contacts the monitored server to get the configuration for the graphs, although I did find a cache of the data in /var/lib/munin/datafile. If you haven't granted access to the new server yet, this may be causing your issue.

BillThor
  • 27,354
  • 3
  • 35
  • 69
  • I tried to remove datafile and others, but it's possible that munin miss some information. As it call munin-node with config and fetch, the config information are not in the rrd files, then it should get from somewehere – mpromonet Dec 09 '14 at 10:15