SlideShare a Scribd company logo
1 of 6
Download to read offline
Configure a Whatsapp alert with Pandora FMS
Table of Contents
1 Using the script
1.1 Unpackage the code..................................................................................................................2
1.2 Retrieve auth password.............................................................................................................2
1.3 Executing the script manually...................................................................................................2
2 Configuring the alert
2.1 Configure a command...............................................................................................................4
2.2 Configure an action...................................................................................................................4
2.3 Configure a template.................................................................................................................5
3 Creating the alert
With Pandora FMS is possible configure an alert that send a Whatsapp to a mobile phone
using a unofficial API named WhatsAPI (https://github.com/aesedepece/WhatsAPI).
1 Using the script
1.1 Unpackage the code
The package contains a file named “send_whatsapp.php” and a directores “whatsapi”
and “yowsup”.
We need to copy it in the same path. In example /tmp/send_whatsapp
1.2 Retrieve auth password
The first step to use the script is obtain the password from the Whatsapp servers using
Yowsup project.
Is a python project, so we will need to have installed python and all the necessary
dependences in our system
In the yowsup/src folder, there are all the necessary to get it. First we must fill the
config.example file with our phone number (with country prefix);
cc=34
phone=34666123456
id=
password=
Then we execute the Yowsup script to receive a confirmation code in our phone (by SMS or
Voice message):
python ./yowsup-cli -c config.example -d --requestcode voice
python ./yowsup-cli -c config.example -d --requestcode sms
In few moments we will receive a 6 digit confirmation code in our phone. We use it to request
the authentication password:
python ./yowsup-cli -c config.example -d -R 123456
We receibe a base64 coded password that is all we need to use the WhatsAPI.
1.3 Executing the script manually
A simple script in PHP has been created to accept parameters via console and be
executed in the following way:
Syntax:
php5 send_whatsapp.php [phone_number_source] [password] [phone_number_target]
[message]
Example:
php5 send_whatsapp.php 34666123456 cGFzc3dvcmQ= 34666654321 "What's up
Whatsapp!"
NOTES:
–The Phone numbers have the country code as prefix
–The script depends on the API used and it, on the Whatsapp messenger servers. If
Whatshapp changes their systems, is possible that the script doesn't work.
2 Configuring the alert
We're going to show how configure an alert on Pandora FMS to send a Whatsapp
message step by step
2.1 Configure a command
We configure a command in Pandora FMS with the 2 first parameters of the script
(number and imei of the source phone) in the field 1, the target phone number in the field 2
and the message in the field 3.
2.2 Configure an action
Then we will configure an alert to send a Whatsapp message to, in example, the
mobile phone of the support department.
We will fill the fields 1 and 2, with the phone number and IMEI of the source mobile and the
target phone number (in this case the phone of support).
In this way, when we configure a template, we only have to fill the field 3 with the desired
message.
2.3 Configure a template
Now we configure an alert template with the desired condition. In this case, we will
check a module with the free disk % and our alert will be fired when it be less than 20%.
As we said, we fill the field 3 (the 2 first fields will be taken from action) with the desired
message. In this case “The disk space is under 20%”.
Finally we can set a recovery message to receive a message when the alert will be recovered.
In this case “The free space disk is over 20% again”.
The field 2 will be empty, but if we want, we can set it with a different phone number where
receive the recovery whatsapps.
3 Creating the alert
The last step is create the alert in the desired module, and when the condition will be
matched (the module value been less than 20) the alert will be fired sending to the configured
phone number a whatsapp message with the text.
In the same way a recovery message will be sended to the phone device if is configured.

More Related Content

Viewers also liked

Viewers also liked (19)

Pandora FMS: Mysql Server Monitoring
Pandora FMS: Mysql Server MonitoringPandora FMS: Mysql Server Monitoring
Pandora FMS: Mysql Server Monitoring
 
Pandora FMS: Plugin Enterprise de SQL
Pandora FMS: Plugin Enterprise de SQLPandora FMS: Plugin Enterprise de SQL
Pandora FMS: Plugin Enterprise de SQL
 
Pandora FMS: Plugin de monitorización de cliente de Exchage
Pandora FMS: Plugin de monitorización de cliente de ExchagePandora FMS: Plugin de monitorización de cliente de Exchage
Pandora FMS: Plugin de monitorización de cliente de Exchage
 
Pandora FMS: Plugin Enterprise de Exchange
Pandora FMS: Plugin Enterprise de ExchangePandora FMS: Plugin Enterprise de Exchange
Pandora FMS: Plugin Enterprise de Exchange
 
Pandora FMS: Plugin de monitorización Selenium
Pandora FMS: Plugin de monitorización SeleniumPandora FMS: Plugin de monitorización Selenium
Pandora FMS: Plugin de monitorización Selenium
 
Whats new in Pandora FMS 5.0
Whats new in Pandora FMS 5.0Whats new in Pandora FMS 5.0
Whats new in Pandora FMS 5.0
 
Pandora FMS: Blackberry Exchange Monitoring
Pandora FMS: Blackberry Exchange MonitoringPandora FMS: Blackberry Exchange Monitoring
Pandora FMS: Blackberry Exchange Monitoring
 
Pandora FMS: Sun One webserver
Pandora FMS: Sun One webserverPandora FMS: Sun One webserver
Pandora FMS: Sun One webserver
 
Pandora FMS: Monitorización de servidores MySQL
Pandora FMS: Monitorización de servidores MySQLPandora FMS: Monitorización de servidores MySQL
Pandora FMS: Monitorización de servidores MySQL
 
Pandora FMS: ePolicy Orchestrator
Pandora FMS: ePolicy Orchestrator Pandora FMS: ePolicy Orchestrator
Pandora FMS: ePolicy Orchestrator
 
Pandora FMS: Raven DB Plugin
Pandora FMS: Raven DB PluginPandora FMS: Raven DB Plugin
Pandora FMS: Raven DB Plugin
 
Pandora FMS: Oracle Enterprise Plugin
Pandora FMS: Oracle Enterprise PluginPandora FMS: Oracle Enterprise Plugin
Pandora FMS: Oracle Enterprise Plugin
 
Pandora FMS: Monitorización de Blackberry Exchange
Pandora FMS: Monitorización de Blackberry ExchangePandora FMS: Monitorización de Blackberry Exchange
Pandora FMS: Monitorización de Blackberry Exchange
 
Pandora FMS: Monitorización de servidor FTP
Pandora FMS: Monitorización de servidor FTPPandora FMS: Monitorización de servidor FTP
Pandora FMS: Monitorización de servidor FTP
 
Pandora FMS: Windows Phone 7 Agent
Pandora FMS: Windows Phone 7 AgentPandora FMS: Windows Phone 7 Agent
Pandora FMS: Windows Phone 7 Agent
 
Pandora FMS: Advanced Log Parser
Pandora FMS: Advanced Log Parser Pandora FMS: Advanced Log Parser
Pandora FMS: Advanced Log Parser
 
Pandora FMS - Selenium Enterprise Plugin
Pandora FMS - Selenium Enterprise PluginPandora FMS - Selenium Enterprise Plugin
Pandora FMS - Selenium Enterprise Plugin
 
Pandora FMS: Jboss monitoring
Pandora FMS: Jboss monitoring Pandora FMS: Jboss monitoring
Pandora FMS: Jboss monitoring
 
Pandora FMS: IIS Enterprise Plugin
Pandora FMS: IIS Enterprise PluginPandora FMS: IIS Enterprise Plugin
Pandora FMS: IIS Enterprise Plugin
 

More from Pandora FMS

More from Pandora FMS (20)

Pandora FMS: Plugin de Raven DB
Pandora FMS: Plugin de Raven DBPandora FMS: Plugin de Raven DB
Pandora FMS: Plugin de Raven DB
 
Pandora FMS: Plugin de Apache Hbase
Pandora FMS: Plugin de Apache HbasePandora FMS: Plugin de Apache Hbase
Pandora FMS: Plugin de Apache Hbase
 
Pandora FMS: Plugin de exchange de acceso de web
Pandora FMS: Plugin de exchange de acceso  de web Pandora FMS: Plugin de exchange de acceso  de web
Pandora FMS: Plugin de exchange de acceso de web
 
Pandora FMS: Exchange OWA Plugin
Pandora FMS: Exchange OWA PluginPandora FMS: Exchange OWA Plugin
Pandora FMS: Exchange OWA Plugin
 
Pandora FMS: Plugin de monitorización de Outlook Anywhere
Pandora FMS: Plugin de monitorización de Outlook AnywherePandora FMS: Plugin de monitorización de Outlook Anywhere
Pandora FMS: Plugin de monitorización de Outlook Anywhere
 
Pandora FMS: Outlook Anywhere Plugin
Pandora FMS: Outlook Anywhere PluginPandora FMS: Outlook Anywhere Plugin
Pandora FMS: Outlook Anywhere Plugin
 
Pandora FMS: Exchange Enterprise plugin
Pandora FMS: Exchange Enterprise pluginPandora FMS: Exchange Enterprise plugin
Pandora FMS: Exchange Enterprise plugin
 
Pandora FMS: End to End Exchange Plugin
Pandora FMS: End to End Exchange PluginPandora FMS: End to End Exchange Plugin
Pandora FMS: End to End Exchange Plugin
 
Pandora FMS: Plugin de Exchange ActivSync
Pandora FMS: Plugin de Exchange ActivSyncPandora FMS: Plugin de Exchange ActivSync
Pandora FMS: Plugin de Exchange ActivSync
 
Pandora FMS: Exchange ActivSync Plugin
Pandora FMS: Exchange ActivSync PluginPandora FMS: Exchange ActivSync Plugin
Pandora FMS: Exchange ActivSync Plugin
 
Pandora FMS: Plugin Enterprise de VMware
Pandora FMS: Plugin Enterprise de VMwarePandora FMS: Plugin Enterprise de VMware
Pandora FMS: Plugin Enterprise de VMware
 
Pandora FMS: Plugin de monitorización de Hyper V
Pandora FMS: Plugin de monitorización de Hyper VPandora FMS: Plugin de monitorización de Hyper V
Pandora FMS: Plugin de monitorización de Hyper V
 
Pandora FMS: Plugin de correo Imap
Pandora FMS: Plugin de correo ImapPandora FMS: Plugin de correo Imap
Pandora FMS: Plugin de correo Imap
 
Pandora FMS: PostgreSQL Plugin
Pandora FMS: PostgreSQL PluginPandora FMS: PostgreSQL Plugin
Pandora FMS: PostgreSQL Plugin
 
Pandora FMS: MongoDB plugin
Pandora FMS: MongoDB pluginPandora FMS: MongoDB plugin
Pandora FMS: MongoDB plugin
 
Pandora FMS: Informix plugin
Pandora FMS: Informix pluginPandora FMS: Informix plugin
Pandora FMS: Informix plugin
 
Pandora FMS: Informix Plugin
Pandora FMS: Informix PluginPandora FMS: Informix Plugin
Pandora FMS: Informix Plugin
 
Pandora FMS: Plugin Enterprise de monitorización de servidor DB2
Pandora FMS: Plugin Enterprise de monitorización de servidor DB2Pandora FMS: Plugin Enterprise de monitorización de servidor DB2
Pandora FMS: Plugin Enterprise de monitorización de servidor DB2
 
Pandora FMS: DB2 Enterprise Plugin
Pandora FMS: DB2 Enterprise PluginPandora FMS: DB2 Enterprise Plugin
Pandora FMS: DB2 Enterprise Plugin
 
Pandora FMS:Cassandra Plugin
Pandora FMS:Cassandra PluginPandora FMS:Cassandra Plugin
Pandora FMS:Cassandra Plugin
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Pandora FMS: Sending alerts to whatsapp

  • 1. Configure a Whatsapp alert with Pandora FMS Table of Contents 1 Using the script 1.1 Unpackage the code..................................................................................................................2 1.2 Retrieve auth password.............................................................................................................2 1.3 Executing the script manually...................................................................................................2 2 Configuring the alert 2.1 Configure a command...............................................................................................................4 2.2 Configure an action...................................................................................................................4 2.3 Configure a template.................................................................................................................5 3 Creating the alert
  • 2. With Pandora FMS is possible configure an alert that send a Whatsapp to a mobile phone using a unofficial API named WhatsAPI (https://github.com/aesedepece/WhatsAPI). 1 Using the script 1.1 Unpackage the code The package contains a file named “send_whatsapp.php” and a directores “whatsapi” and “yowsup”. We need to copy it in the same path. In example /tmp/send_whatsapp 1.2 Retrieve auth password The first step to use the script is obtain the password from the Whatsapp servers using Yowsup project. Is a python project, so we will need to have installed python and all the necessary dependences in our system In the yowsup/src folder, there are all the necessary to get it. First we must fill the config.example file with our phone number (with country prefix); cc=34 phone=34666123456 id= password= Then we execute the Yowsup script to receive a confirmation code in our phone (by SMS or Voice message): python ./yowsup-cli -c config.example -d --requestcode voice python ./yowsup-cli -c config.example -d --requestcode sms In few moments we will receive a 6 digit confirmation code in our phone. We use it to request the authentication password: python ./yowsup-cli -c config.example -d -R 123456 We receibe a base64 coded password that is all we need to use the WhatsAPI. 1.3 Executing the script manually A simple script in PHP has been created to accept parameters via console and be executed in the following way: Syntax: php5 send_whatsapp.php [phone_number_source] [password] [phone_number_target] [message]
  • 3. Example: php5 send_whatsapp.php 34666123456 cGFzc3dvcmQ= 34666654321 "What's up Whatsapp!" NOTES: –The Phone numbers have the country code as prefix –The script depends on the API used and it, on the Whatsapp messenger servers. If Whatshapp changes their systems, is possible that the script doesn't work.
  • 4. 2 Configuring the alert We're going to show how configure an alert on Pandora FMS to send a Whatsapp message step by step 2.1 Configure a command We configure a command in Pandora FMS with the 2 first parameters of the script (number and imei of the source phone) in the field 1, the target phone number in the field 2 and the message in the field 3. 2.2 Configure an action Then we will configure an alert to send a Whatsapp message to, in example, the mobile phone of the support department. We will fill the fields 1 and 2, with the phone number and IMEI of the source mobile and the target phone number (in this case the phone of support). In this way, when we configure a template, we only have to fill the field 3 with the desired message.
  • 5. 2.3 Configure a template Now we configure an alert template with the desired condition. In this case, we will check a module with the free disk % and our alert will be fired when it be less than 20%. As we said, we fill the field 3 (the 2 first fields will be taken from action) with the desired message. In this case “The disk space is under 20%”. Finally we can set a recovery message to receive a message when the alert will be recovered. In this case “The free space disk is over 20% again”. The field 2 will be empty, but if we want, we can set it with a different phone number where receive the recovery whatsapps.
  • 6. 3 Creating the alert The last step is create the alert in the desired module, and when the condition will be matched (the module value been less than 20) the alert will be fired sending to the configured phone number a whatsapp message with the text. In the same way a recovery message will be sended to the phone device if is configured.