Pandora FMS Community

Suggestions on a monitoring task

supplyd · 2 dic 2015, 21:05 · 4 mensajes · 55 visitas

  1. Inicio del debate

    We have a nightly task that transfers database backups (in tar.gz format) to a directory on a NAS for archival storage using rsync. I've been asked to monitor to make sure the transfer happens. My first thought is to capture the exit code from rsync on the server that initiates the transfer and send it to PandoraFMS, since 0 indicates the rsync was successful. Any non-zero exit code would indicate a potential problem. The issue with that is, if something causes rsync not to run at all, the exit code won't be received and we won't be alerted. I'm wondering if there is a mechanism to take action after a certain time has passed without receiving the exit code update from rsync. An example for clarity: Server1 runs a database dump on Day 1. The dump file is tar/gzipped and then rsync'd to the NAS. Exit code is 0. Server 1 sends an update message to PandoraFMS, which displays a success message. On Day 2, rsync runs but there is an error and a non-zero exit code is generated. Server1 sends an update to PandoraFMS which issues an alert. On Day 3, something happens causing rsync not to run at all. Server1 does not send an exit code since none was generated. PandoraFMS expects an exit code within a certain timeout period. When none is received after the timeout expires, PandoraFMS alerts. So is this the right approach, and if so, how do I configure a timeout on PandoraFMS so it knows how long to wait for the update? Thanks!

  2. Hello supplyd, I don't think that's the best way to do so. Have you thought about using ftp? I'm just saying... Wouldn't it be safer for the backup to be done by parallel/different processes? I mean, you should do the backup to the NAS trough rsync (for example) with cron (or whatever the method is that you're thinking of), and then, monitor the file with ftp, something like comparing if there's MD5 matches between those two files (both, the original and the copy). I don't recommend you to monitor the copy itself with the pandora agent, it'll work better doing so separately, it's more secure, because if the Pandora doesn't work, the copy will be done either way. I hope I've made myself clear, do not hesitate about asking again ;) Regards, Emilio.

  3. Emilio, thanks for your reply. I had not thought about ftp as an option here. I will investigate that. Thanks again!

  4. Hello supplyd, I'm glad that you found it useful :) Let me know if you have another question ;) Regards, Emilio.

Entra en tu cuenta para publicar.