Sample Exchange

 View Only

Send Critical vROps Alerts to your phone 

Aug 23, 2019 10:53 PM

This script enables the sending of all Critical vROps Alerts to your phone using Slack.
You run on a Windows or Linux machine somewhere where vROps can reach with POST requests.

 

Prerequisites:

 

Phone:

Ensure that Slack is set to notify you immediately on phone and that 'Do Not Disturb' is not set

Settings >> Notifications >> Notify me on mobile >> As quickly as possible

 

Terminal:

First, install python3

pip install flask slacker

 

vROps UI:

Administration >> Management >> Outbound Settings


Add a new Outbound Instance 

Plugin Type : REST Notification Plugin

Url : http://<ip address where script is running>:8001

Content Type : application/json

 


Alerts >> Alert Settings >> Notification Settings


Add a new rule

Method : Rest Notification Plugin | <Outbound Instance from above>

Criticality : Critical

 


Firewall:

Open port 8001 inbound 

 

This script enables the sending of all Critical vROps Alerts to your phone using Slack.

You run on a Windows or Linux machine somewhere where vROps can reach with POST requests.


Sign up for Slack, create a workspace, create a channel called vrops


Get an API token from the following page :

https://api.slack.com/custom-integrations/legacy-tokens


Use this token in line 9 of the code

 

Phone
~~~~~
Ensure that Slack is set to notify you immediately on phone and that 'Do Not Disturb' is not set

Settings >> Notifications >> Notify me on mobile >> As quickly as possible

 

Terminal
~~~~~~~~
install python3

pip install flask slacker

 

vROps UI
~~~~~~~~

Administration >> Management >> Outbound Settings


Add a new Outbound Instance 
---------------------------

Plugin Type : REST Notification Plugin

Url : http://<ip address where script is running>:8001

Content Type : application/json

 


Alerts >> Alert Settings >> Notification Settings


Add a new rule
--------------

Method : Rest Notification Plugin | <Outbound Instance from above>

Criticality : Critical

 


Firewall
~~~~~~~~

Open port 8001 inbound 

 

This script enables the sending of all Critical vROps Alerts to your phone using Slack.
You run on a Windows or Linux machine somewhere where vROps can reach with POST requests.


Sign up for Slack, create a workspace, create a channel called vrops


Get an API token from the following page :

https://api.slack.com/custom-integrations/legacy-tokens


Use this token in line 9 of the code

 

Phone
~~~~~
Ensure that Slack is set to notify you immediately on phone and that 'Do Not Disturb' is not set

Settings >> Notifications >> Notify me on mobile >> As quickly as possible

 

Terminal
~~~~~~~~
install python3

pip install flask slacker

 

vROps UI
~~~~~~~~

Administration >> Management >> Outbound Settings


Add a new Outbound Instance 
---------------------------

Plugin Type : REST Notification Plugin

Url : http://<ip address where script is running>:8001

Content Type : application/json

 


Alerts >> Alert Settings >> Notification Settings


Add a new rule
--------------

Method : Rest Notification Plugin | <Outbound Instance from above>

Criticality : Critical

 


Firewall
~~~~~~~~

Open port 8001 inbound 

 

 
Sign up for Slack, create a workspace, create a channel called vrops
 
 
Get an API token from the following page :
 
https://api.slack.com/custom-integrations/legacy-tokens
 
 
Use this token in line 9 of the code
 
 
 
Phone
~~~~~
Ensure that Slack is set to notify you immediately on phone and that 'Do Not Disturb' is not set
 
Settings >> Notifications >> Notify me on mobile >> As quickly as possible
 
 
 
Terminal
~~~~~~~~
install python3
 
pip install flask slacker
 
 
 
vROps UI
~~~~~~~~
 
Administration >> Management >> Outbound Settings
 
 
Add a new Outbound Instance 
---------------------------
 
Plugin Type : REST Notification Plugin
 
Url : http://<ip address where script is running>:8001
 
Content Type : application/json
 
 
 
 
Alerts >> Alert Settings >> Notification Settings
 
 
Add a new rule
--------------
 
Method : Rest Notification Plugin | <Outbound Instance from above>
 
Criticality : Critical
 
 
 
 
Firewall
~~~~~~~~
 
Open port 8001 inbound 
 
 

#vRealizeOperationsManager
#vRealizeOperationsManager
#Python
#notifications
#Apache2.0

Statistics
0 Favorited
3 Views
1 Files
0 Shares
0 Downloads
Attachment(s)
py file
snippet.py   3 KB   1 version
Uploaded - Apr 09, 2024

Tags and Keywords

Related Entries and Links

No Related Resource entered.