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.