Whether by API or SSH, a monitoring script needs to perform some kind of login to a device.
I currently have my scripts login, complete the task, then logout. I use a cron to run the script at desired intervals. But this is causing a lot of noisy log entries (e.g 1 login + 1 logout message per device per minute if I'm monitoring at 1 min intervals) .
This isn't a huge problem but it has me wondering if this is actually best practice or if it is actually better to have a script maintain a single, long session and run the looping/timing inside the script. The downside to this is that I'm not a software developer and I worry about causing memory issues with a poorly implemented script that has been left running for a week, whereas with my current method everything is neatly closed down after the task is completed and reopened on the next run.
What do others do?
No comments:
Post a Comment