Comments (4)
Thank you
from python-alerta-client.
HTML links only work if they are sent in the alert text
. Any reason why you want the link in the event
name. That could effect alert de-duplication/correlation.
from python-alerta-client.
Thank you Sattery, I am going to use Aletta for multiple nagios, I would like to have nagios service check name should be redirected to actual nagios check page and I will send nagios service description to text filed.
So only I would like to have html link in event filed.
Pls help me is there any way to do it
from python-alerta-client.
I suggest you put it in an attribute ...
#!/usr/bin/env python
from alertaclient.api import Client
client = Client()
a = """
<html>
<a href="where/you/want/the/link/to/go">text of the link</a>
</html>
"""
try:
alert = client.send_alert(
severity='critical',
environment='Production',
service=['s11p02b175'],
resource='10.11.12.175',
event='foo',
value='Check_Disks',
attributes={'nagiosUrl':a},
# text='CRIT bounce=1008Brfailsafe=0, queue=0',
text=a
)
print(alert)
except Exception as e:
print(e)
If it is an attribute value it will render the HTML link correctly in the alert details page.
If you need it to be visible in the alert list without having to click in to see the alert details then you will need to modify the alert-list.html
file. Within the ng-repeat="alert in alerts...
add the following...
<td><span ng-bind-html="alert.attributes.nagiosUrl"></span></td>
You will also need to give it a suitable column heading in the block of code above otherwise everything will be out by one.
Let me know if you need any more help.
from python-alerta-client.
Related Issues (20)
- Configurable timeout for alerts created from heartbeats
- Get config request ignores "SSL verify" setting
- severity used to close stale heartbeat alerts is hardcoded to 'normal' HOT 2
- Handle when config cannot be loaded from server
- Error when creating new users HOT 1
- output=silent (crontab mode) HOT 7
- Alerts on heartbeat are not triggered HOT 6
- Add generating heartbeat alerts to python SDK HOT 1
- Wheel name and python package name are different HOT 4
- `alerta heartbeats --alert` broken HOT 4
- TypeError: Object of type 'function' is not JSON serializable from CLI when running heartbeat alert HOT 1
- TypeError: Object of type 'function' is not JSON serializable from CLI when running heartbeat alert HOT 2
- SDK passing page size as "None" if not set
- alerta delete not removing all alerts HOT 1
- TypeError: 'User' object is not subscriptable
- Cron job for stale or slow heartbeats do not accept arguments specified in the documentation HOT 1
- Set alarm status in send_alarm HOT 3
- Add Python3 typing
- Alerta doesn't return all alert with get_alerts
- Unable to handshake between alerta server and Web UI HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-alerta-client.