I have a service template, where I've added "notes" to the misc tab of the template definition.
When I build a service with that template, the notes appear if I open the service and then open advanced, and view in nagios core.
Is there a way to present those notes directly in the XI interface?
In the attached screenshots, the "please call huit its devops on call for these alerts" is the note that I would like to present in the XI interface.
thanks,
-Luke
notes in service template -- appears in core view, but not i
-
lukesullivan
- Posts: 34
- Joined: Tue Jan 24, 2017 11:12 am
notes in service template -- appears in core view, but not i
You do not have the required permissions to view the files attached to this post.
-
kyang
Re: notes in service template -- appears in core view, but n
Hello,
You could try using the notes component. Which will display another tab where you can have notes.
https://exchange.nagios.org/directory/A ... nt/details
Just download the .zip --> Go to XI Home Page --> Admin --> lower left, click Manage Components --> upload the .zip file --> Each host/service should have a notes tab.
You could try using the notes component. Which will display another tab where you can have notes.
https://exchange.nagios.org/directory/A ... nt/details
Just download the .zip --> Go to XI Home Page --> Admin --> lower left, click Manage Components --> upload the .zip file --> Each host/service should have a notes tab.
-
lukesullivan
- Posts: 34
- Joined: Tue Jan 24, 2017 11:12 am
Re: notes in service template -- appears in core view, but n
thanks, I'll take a look at that.
do you know if I can programmatically add notes, or if I can define notes in the host or service template, such that when using the api to create an object using that template, the notes will automatically be populated?
do you know if I can programmatically add notes, or if I can define notes in the host or service template, such that when using the api to create an object using that template, the notes will automatically be populated?
-
kyang
Re: notes in service template -- appears in core view, but n
Yes,
If you were looking to add some notes using the API when creating an object.
Using this should do it.
Something like this will add the word "test notes" found in the MISC tab for my new host testapihost1 if you look in the Core Config Manager.
If you were looking to add some notes using the API when creating an object.
Using this should do it.
Code: Select all
¬es=yourNotesCode: Select all
curl -XPOST "http://192.168.3.59/nagiosxi/api/v1/config/host?apikey=mOCi4C8NCZnKdr95Q7ZKunDDhHVdraDRfr9Cjglcf3cLtkQDKPkftW8NT3gltac2&pretty=1" -d "host_name=testapihost1&address=127.0.0.1&check_command=check_ping\!3000,80%\!5000,100%&max_check_attempts=2&check_period=24x7&contacts=nagiosadmin¬ification_interval=5¬ification_period=24x7¬es=test notes&applyconfig=1"-
lukesullivan
- Posts: 34
- Joined: Tue Jan 24, 2017 11:12 am
Re: notes in service template -- appears in core view, but n
any way to have the notes available without having to go into the CCM? Generally I'm not going to let the users use the CCM, but I want to provide notes to them on what to do when a service/host goes critical
thanks,
-Luke
thanks,
-Luke
-
kyang
Re: notes in service template -- appears in core view, but n
Hello,
Have you tried out the component mention above? It should have a separate notes tab for all hosts/services that only an administrator can edit.
We don't currently have a way of showing the template notes in Nagios XI.
Have you tried out the component mention above? It should have a separate notes tab for all hosts/services that only an administrator can edit.
We don't currently have a way of showing the template notes in Nagios XI.
-
[email protected]
- Posts: 68
- Joined: Wed Dec 27, 2017 2:20 pm
- Location: Nieuwegein, The Netherlands
- Contact:
Re: notes in service template -- appears in core view, but n
You could use the Action Component, we use it to jump to a specfic page with instruction for a given nagios service description.
Looking at your use case you could just display the notes field if someone clicks the "Show Notes" link under Quick Actions Although the notes field is not listed on the macro list @ https://assets.nagios.com/downloads/nag ... ios-XI.pdf you can reference it using %notes% and also %notesurl% and %actionurl% can be used.
Looking at your use case you could just display the notes field if someone clicks the "Show Notes" link under Quick Actions Although the notes field is not listed on the macro list @ https://assets.nagios.com/downloads/nag ... ios-XI.pdf you can reference it using %notes% and also %notesurl% and %actionurl% can be used.
You do not have the required permissions to view the files attached to this post.
Last edited by [email protected] on Wed May 16, 2018 5:16 pm, edited 1 time in total.
-
[email protected]
- Posts: 68
- Joined: Wed Dec 27, 2017 2:20 pm
- Location: Nieuwegein, The Netherlands
- Contact:
Re: notes in service template -- appears in core view, but n
This is what the simpliest possible code looks like. I uncommented the standard PHP code snippet and made sure a Quick Link is only visible for services with actual notes (either from templates or directly from the service itself)
Code: Select all
if ('%notes%' != "") {
$showlink = true;
} else {
$showlink = false;
}You do not have the required permissions to view the files attached to this post.
Last edited by [email protected] on Thu May 17, 2018 3:36 pm, edited 1 time in total.
-
kyang
Re: notes in service template -- appears in core view, but n
Thanks for the help [user][email protected][/user]
lukesullivan, let us know if you have any more questions.
lukesullivan, let us know if you have any more questions.