I also wanted an IP address on the device page, so I edited /opt/observium/html/pages/device/overview/information.inc.php and /opt/observium/html/pages/device/overview/information_extended.inc.php to resolve the host name and post the ip.

My device pages look like this:

Hardware: ex4200-24T
Operating System: JunOS
System name: mydevice
Address: 192.168.0.1
Contact: someone
Location: somewhere
Serial: 123
Uptime: 12 days

Below is the code I added to the files.

///EDIT
if ($device['sysName'])
{
  echo('<tr>
        <td class="entity">System name</td>');
  echo('
        <td>' . escape_html($device['sysName']). '</td>
      </tr>');

  echo('<tr>
        <td class="entity">Address</td>');
        $S_hostname = $device['hostname'];
        $S_ip = gethostbyname($S_hostname);
  echo('
        <td>' . escape_html($S_ip). '</td>
      </tr>');
}
//////////



On 11/07/2016 02:45 PM, John Simino wrote:

I too sometimes look for it on the device page.  There is a section in the device page that lists Hardware, OS, Name, Location and Uptime.  I would add IP address to that section.

 

It could also be displayed as a Known addresses listing on the main page along with processors, memory, storage, and other tabular data.  If there were multiple addresses for a device, they could all be listed in the tabular listing.

 

From: observium [mailto:observium-bounces@observium.org] On Behalf Of Adam Armstrong
Sent: Monday, November 07, 2016 1:37 PM
To: Observium Network Observation System <observium@observium.org>
Subject: Re: [Observium] Small feature request

 

Where would you put it on the UI?

Adam.


Sent from BlueMail

On 7 Nov 2016, at 18:58, Attila Nagy <memetic.org@tylla.hu target=_blank>tylla_at_memetic.org@tylla.hu> wrote:

Hi all!

I ran into this small deficit a few times, but now I decided to report 
it, maybe it gets the attention of other fellow users and/or of developers.

So the small thing that I miss sometimes from the GUI is the display of 
the IP address of a device.
In my opinion this information should definitely be listed on the 
overview page, but optimally it should also appear in the tooltip that 
appears when hovering the mouse (let's say after the FQDN in square 
brackets).
And given the fact that a device can have many IP addresses, I would say 
lets display the one that the devices FQDN resolves to (mostly this is 
that I am eager to know).

Yes-yes, I know, DNS solves most of the problems, but sometimes it is 
just easier if you know the IP address.

Any opinions?

Regards,
Tylla

observium mailing list
observium@observium.org
http://postman.memetic.org/cgi-bin/mailman/listinfo/observium


_______________________________________________
observium mailing list
observium@observium.org
http://postman.memetic.org/cgi-bin/mailman/listinfo/observium