I would like to website to show information about host
-
- Posts: 36
- Joined: Thu Feb 25, 2016 7:42 am
I would like to website to show information about host
I would like to website to show information about host computer ie ip and mac address, of course I have the address of computer name
Re: I would like to website to show information about host
If you can post a screenshot of where you want the information displayed, that might be helpful.
Notes are a pretty easy way to store such references:
The end result:
If you wanted it somewhere else, you'd likely need to modify the CGIs or submit a feature request via the github. Here's some C I hacked together to get some Kibana/Marvel graphs to show for hosts in multiple spots:
https://pastebin.com/HERbhf6X
Which uses the following custom attributes for a given host:
It exists in multiple places in status.c; I just highlighted once instance. Incredibly inelegant, but worked as a proof of concept for my use case.
Notes are a pretty easy way to store such references:
Code: Select all
define host{
...
notes hello world
...
}
The end result:
If you wanted it somewhere else, you'd likely need to modify the CGIs or submit a feature request via the github. Here's some C I hacked together to get some Kibana/Marvel graphs to show for hosts in multiple spots:
https://pastebin.com/HERbhf6X
Which uses the following custom attributes for a given host:
Code: Select all
define host{
...
_marvel_node_ip 10.26.100.21
_marvel_node_name esdev01
...
}
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: I would like to website to show information about host
@mcapra, cool solution! @rumarcin11 does that answer your question?
Previous Nagios employee
-
- Posts: 36
- Joined: Thu Feb 25, 2016 7:42 am
Re: I would like to website to show information about host
No. I mean I would like the www to show ip info and physical mac address
define host{
use host-pc
host_name eendlo
alias 2.05
address 13835_CEZ
hostgroups pc
parents BA-PD2
notes (PD2-2/16)
# contact_gruops admins
}
define host{
use host-pc
host_name eendlo
alias 2.05
address 13835_CEZ
hostgroups pc
parents BA-PD2
notes (PD2-2/16)
# contact_gruops admins
}
Re: I would like to website to show information about host
Nagios does show you this info... Am I missing something? See below:No. I mean I would like the www to show ip info and physical mac address
Code: Select all
define host{
use linux-server
host_name test
alias My test host
address 192.168.4.41
hostgroups linux-servers
parents localhost
notes (Test Linux VM - MAC Address: 00:0c:29:6d:bf:b0)
}
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 36
- Joined: Thu Feb 25, 2016 7:42 am
Re: I would like to website to show information about host
I have several computers and ips are automatically, so it needs to www to show me the ip of the computer because I set in the "address" configuration as the computer name, not ip after. Because it will not be this computer all the time he had the same ip
-
- Posts: 36
- Joined: Thu Feb 25, 2016 7:42 am
Re: I would like to website to show information about host
In place of service ping, to still show ip and not just status "OK"
Re: I would like to website to show information about host
Maybe instead of ping, you could use check_dns. You should be able to see the ip in the output.
Example:
command definition
host definition (google public dns)
service definition
in the GUI
The ip address (8.8.8.8) is shown in the GUI. When I change the address of my test host from "google-public-dns-a.google.com" to "mpr.org", I see the updated ip address.
host definition (Minnesota Public Radio)
in the GUI
Example:
command definition
Code: Select all
define command {
command_name check_dns
command_line $USER1$/check_dns -H $HOSTADDRESS$ $ARG1$
}
Code: Select all
define host{
use linux-server
host_name test
alias My test host
address google-public-dns-a.google.com
hostgroups linux-servers
parents localhost
notes (Test Linux VM - MAC Address: xx:xx:xx:xx:xx:xx)
}
Code: Select all
define service {
host_name test
use generic-service
service_description Check DNS
check_command check_dns
}
host definition (Minnesota Public Radio)
Code: Select all
define host{
use linux-server
host_name test
alias My test host
address mpr.org
hostgroups linux-servers
parents localhost
notes (Test Linux VM - MAC Address: xx:xx:xx:xx:xx:xx)
}
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 36
- Joined: Thu Feb 25, 2016 7:42 am
Re: I would like to website to show information about host
Thank you very much. I would like to know how it looks with mac, i mean i need a notes?
Re: I would like to website to show information about host
I already showed you how the MAC will be displayed on the host.
You could add the "notes" directive to the service too (if you wish).
Example:
Then, you will be able to see the MAC on the service as well.
You could add the "notes" directive to the service too (if you wish).
Example:
Code: Select all
define service {
host_name test
use generic-service
service_description Check DNS
check_command check_dns
notes (Test Linux VM - MAC Address: xx:xx:xx:xx:xx:xx)
}
Be sure to check out our Knowledgebase for helpful articles and solutions!