I am trying to automate the process of "sending the screenshots of a monitoring tool dashboard to my WhatsApp number" at regular intervals.

So far I have achieved the following:

  1. Automated the screenshot taking using pageres-cli
  2. Integrated the same with SMTP server using postfix

Now I also want to send these screenshots to my Whatsapp group or Facebook messenger group. How can I achieve this?

  • hi Dhiru! Is Whatsapp/Facebook a hard requirement? otherwise there is also Slack: api.slack.com/methods/files.upload – Peter Muryshkin Dec 17 '18 at 6:28
  • There are not hard requirement. Acutually monitoring guys takes screenshot from his mobile and sends it to group at regular intervals. – dheerendra Dec 17 '18 at 14:24
  • Anything that i can access from mobile app should work. I will try slack and check if it works well with team. Are you already using this? Thank you for your time! – dheerendra Dec 17 '18 at 14:31
  • currently we have other scenarios, but in other contexts I have observed people posting events instead of scheduled dashboard screenshots. But, maybe sometimes it's good to just have current dashboard in case it behind VPN etc. – Peter Muryshkin Dec 17 '18 at 14:35
  • Uploading to facebook/whatsapp? Do you not have security requirements behind the monitoring? – JohnP Dec 17 '18 at 16:10

In case the requirement for Whatsapp/Facebook is not mandatory, you could consider using a solution offering an API for such things and targeted specifically for IT teams.

For example, Slack channels allow uploading files through Slack's API and sharing files in channels.

Documentation: https://api.slack.com/methods/files.upload

For a ready CLI stub, consider for example slackcat.

  • Hi Peter, I found this tool slackcat. I tested this and it's working well with Linux CLI. I will soon incorporate this in my bash script. What do you say about this tool? Actually i am trying to automate this from CLI. – dheerendra Dec 17 '18 at 15:57
  • have no experience with this tool, but this it's great if there is already a CLI stub for the API! Cool finding, shamelessly added this to the answer body. :-) – Peter Muryshkin Dec 17 '18 at 16:04
  • pageres-cli + slackcat did the job. Unfortunately my organisation's proxy is blocking the connection to slack. Anyway, that's a different thing, my original problem is solved now. Thanks for the help. – dheerendra Dec 17 '18 at 20:29

I am trying to automate the process of "sending the screenshots of a monitoring tool dashboard to my WhatsApp number" at regular intervals.

IMO you're approaching this from a very difficult direction, far more than necessary. Sending screenshots of your monitoring dashboard is presumably so you can check and see when things break. But that's what alerting is for.

There are plenty of alerting tools, and if your monitoring db is a standard one then most of them will have hooks into it. The alerting software will run checks, and when the checks fail notify you by phone, slack, PagerDuty, whatever. This will be far easier to manage than a headless UI tool, will be something other future employees are more likely to have experience with, and most importantly, you won't get pager fatigue because it'll only be notifying you when things are wrong.

  • Totally agree with you, It makes no sense to monitor without any alerting system. We have SMS alerts in place however for some dashboards this integration is not there. We will look forward to integrate them also. – dheerendra Dec 18 '18 at 17:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.