how to add Authentication token
-
- Posts: 6
- Joined: Wed Sep 26, 2018 2:25 am
how to add Authentication token
Hi,
I need to add a authentication token in my nagios to connect it to another monitoring tool.
I am not able to find anything that can work. please help.
I need to add a authentication token in my nagios to connect it to another monitoring tool.
I am not able to find anything that can work. please help.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: how to add Authentication token
Nagios Core does not have a concept of authentication tokens, it uses apache basic authentication with users/passwords.
Nagios XI has API tokens and access, in our commercial product
https://www.nagios.com/products/nagios-xi/
Nagios XI has API tokens and access, in our commercial product
https://www.nagios.com/products/nagios-xi/
-
- Posts: 6
- Joined: Wed Sep 26, 2018 2:25 am
Re: how to add Authentication token
Is there any scope to add authorization token while sending an alert?
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: how to add Authentication token
No, however in Nagios XI we do have rapid response URLs that can be used without credentials.diksharawat wrote:Is there any scope to add authorization token while sending an alert?
-
- Posts: 6
- Joined: Wed Sep 26, 2018 2:25 am
Re: how to add Authentication token
Thanks for the reply @scottwilkerson.
I am sorry if i am able to make myself clear or if i am not getting what you.
My problem is:
I am integrating Nagios with Alerta, and for that i need to add token in my Nagios configuration, so that with correct token, Nagios will be authorized to send alerts to Alerta.
Our Alerta is using token concept to authorize who all can send alerts to it.
Is there a way i can do this with Nagios core or i need to buy NagiosXI?
I am sorry if i am able to make myself clear or if i am not getting what you.
My problem is:
I am integrating Nagios with Alerta, and for that i need to add token in my Nagios configuration, so that with correct token, Nagios will be authorized to send alerts to Alerta.
Our Alerta is using token concept to authorize who all can send alerts to it.
Is there a way i can do this with Nagios core or i need to buy NagiosXI?
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: how to add Authentication token
I am not familiar with Alerta, do you need to ann Alerta's Authentication token?
There isn't an authentication token for Nagios or Nagios XI that can be included in notifications.
There isn't an authentication token for Nagios or Nagios XI that can be included in notifications.
Re: how to add Authentication token
Notification and event handlers have a concept of "arguments", as does any old Nagios command definition:
https://assets.nagios.com/downloads/nag ... tions.html
https://assets.nagios.com/downloads/nag ... dlers.html
Assuming this token is to be provided to some sort of API call, you could include that as an argument in your notification or event handler.
Here's a reference implementation of a Twilio integration I did:
https://support.nagios.com/forum/viewto ... 94#p252294
In which case I'm passing my "token" via -u <credentials> to a simple curl. That curl could be a custom script, some sort of binary, practically whatever you want/need to communicate with Alerta.
It looks like Alerta has an API as well as a Python client. Both of these could be integrated with Nagios Core as I have described above.
https://assets.nagios.com/downloads/nag ... tions.html
https://assets.nagios.com/downloads/nag ... dlers.html
Assuming this token is to be provided to some sort of API call, you could include that as an argument in your notification or event handler.
Here's a reference implementation of a Twilio integration I did:
https://support.nagios.com/forum/viewto ... 94#p252294
In which case I'm passing my "token" via -u <credentials> to a simple curl. That curl could be a custom script, some sort of binary, practically whatever you want/need to communicate with Alerta.
It looks like Alerta has an API as well as a Python client. Both of these could be integrated with Nagios Core as I have described above.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
-
- Posts: 6
- Joined: Wed Sep 26, 2018 2:25 am
Re: how to add Authentication token
@mcapra
Thanks for the reply.
I am not sending events to ALerta using curl. We are using ALerta's alerta-neb.c file given in https://github.com/alerta/nagios-alerta.
I have given endpoint in nagios.cfg as Alerta's IP and port.
I am not able to find a way to add token.
Is there any way i can do that?
Thanks for the reply.
I am not sending events to ALerta using curl. We are using ALerta's alerta-neb.c file given in https://github.com/alerta/nagios-alerta.
I have given endpoint in nagios.cfg as Alerta's IP and port.
I am not able to find a way to add token.
Is there any way i can do that?
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: how to add Authentication token
On the alerta page you linked I see this example, is this what you are looking for?
To provide the API key if authentication is enabled on the alerta server:
Code: Select all
broker_module=/usr/lib/nagios/alerta-neb.o http://localhost:8080 key=INSERT_API_KEY_HERE