![](https://secure.gravatar.com/avatar/df9b784677192515acddc09de982fde9.jpg?s=120&d=mm&r=g)
Hi,
I've just supplied a patch to the nav bar (commit 4004) that will pick up anything you put followed by a colon and display it as a group under the ports menu. So I have a bunch of ports which have descriptions which start
ESXData: Inter: Mgmt:
etc and now those headings appear as groups under the port menu automatically when you add them to the config file with
$config['int_groups'] = array("EsxData","EsxMgmt","Inter");
If your existing ports don't start with something like that then you'll need to create a custom port description parser which will pull out the type from however you have it laid out in your port descriptions.
I took the opportunity to re-label all my 330 ports into a better structure and just use the standard parser but the custom parser is easy enough if you can write regular expressions.
regards,
Paul
On 15/05/2013 02:08, Jason Lixfeld wrote:
On 2013-05-14, at 5:59 PM, Tom Laermans tom.laermans@powersource.cx wrote:
On 14/05/2013 23:45, Jason Lixfeld wrote:
My port naming convention for core ports doesn't follow the "Core:" spec required by Observium. Is it possible to specify a custom type, or perhaps change the default? I'd love to see my core ports with a click of the Ports drop-down hopefully by avoiding having to reconfigure over 400 port descriptions. I can't see anything in defaults.inc.php and I'm not well enough versed in php to really know how to go about looking through the php code to try and find the answer. My google-fu is failing me too, so any pointers would be greatly appreciated.
You can write a custom parser and set it in the config:
$config['port_descr_parser'] = "includes/port-descr-parser.inc.php"; # Parse port descriptions into fields
Take a look at that file, make a copy of it, and edit to your needs. It's not the prettiest code, heh - just opened it for the first time.
Basically, the variables used there are the ones you can fill, particularly $type should be filled. $this_port['ifAlias'] is your interface description which you can parse in any way you like.
I don't get it :( Observium shows core ports in the Ports > Core if the interface description starts with "Core:". I don't see any reference to Core: in that file to change it to reflect what my core facing interface descriptions say. _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium