[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Cheshire Cat Computing • View topic - One conf file for all devices

Cheshire Cat Computing

Software support and information
It is currently Sat Nov 08, 2025 6:14 am

All times are UTC + 12 hours [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: Sun Oct 02, 2005 7:47 am 
Offline
Silver User

Joined: Fri Sep 30, 2005 11:31 am
Posts: 10
I use one mrtg.conf file that has all my devices in it. The reason I did this back in the "Classic MRTG" days (for lack of a better description) is that I could control in which order hosts would appear on index pages, since sorting them alphabetically isn't what we need. Nor is a random order (it's an ISP network so the sorting is done per city and segments within each city that are ordered in a logical manner, not perse alphabetically).

routers2 doesn't appear to like this much. All the hosts are showing up, but they are not showing the correct IP addresses. They all show the IP address of the system where routers2 and MRTG run on. The doc/PROBLEMS file mentions something about the mrtg.ok file(s) causing this. Seeing I have only one such file, that might explain it?

Should I put all devices in their own .conf file? Does that mean I need to run a few dozen separate MRTG instances, or can one MRTG instance open multiple config files and save some memory not having to run so many Perl processes?

Or can routers2 obtain the proper IP address otherwise? Maybe read the value directly from the mrtg.conf's target instances, since it uses this to obtain other information already such as max bandwidth and such (or doesn't it obtain that info from that file)?

Gerard


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Sun Oct 02, 2005 2:32 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Sun Oct 02, 2005 4:30 pm 
Offline
Silver User

Joined: Fri Sep 30, 2005 11:31 am
Posts: 10


Top
 Profile Send private message  
 
 Post subject: [targetdesc]?
PostPosted: Tue Oct 04, 2005 8:42 am 
Offline
Silver User

Joined: Fri Sep 30, 2005 11:31 am
Posts: 10
I'm trying to do is change the interface names here. The menus are full with links called "#2." I can change it by adding "target = name" to the routers2.conf file, but I rather put those directives in the mrtg files. That way i don't need to update two files whenever I add a device.

The HOWTO mentions [targetdesc] to specify short descriptions. The routers2.conf example file doesn't include that section. What is the syntax for it?

The example conf file under section [targetnames] says:

# ---Targets ( should be in .cfg file! Use routers.cgi*Desc: ... )
# ---Device (file) names (should be in .cfg files. User routers.cgi*ShDesc[]:)

Maybe I misunderstand this and device name isn't the same as interface name?


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Tue Oct 04, 2005 8:52 am 
Offline
Silver User

Joined: Fri Sep 30, 2005 11:31 am
Posts: 10
Maybe I am reading the wrong files but a lot of display and formatting questions I can't find answered in any of the doc/* files.

For instance, when i load "Summary" pages, above all the graphs is a page title that now says "mrtg." When I collapse the "Devices" menu in the left frame (and it gets replaced by an "Options" buttong) there's something called "mrtg." I guess since it appears directly under the "Devices" button, it's the device name? But it also appears on the summary pages when all devices are listed. Yes, I went to one cfg file per device like previously suggested. Is it taking this from the master .cfg file?


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Tue Oct 04, 2005 11:54 pm 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
First, the labels in the Targets menu.

There are several ways to set these. In order of preference:
(In the .cfg file)
routers.cgi*ShortDesc[target]: Foo Router
SetEnv[target]: MRTG_DESCR="Foo Router"

Now, the labels in the Devices menu (these correspond to separate .cfg files)
routers.cgi*Desc: Footown Site

The [targetdesc] section is and old thing now deprecated, you should use the above directives (see the MRTG_INFO documentation for all syntax) instead.

Each .cfg file corresponds to a Device. Each Device has a short description (used as the menu label) and a Long description (used as a title, for example in the Summary). These are determined in a number of ways, which can be chosenin the routers2.conf, if you do not explicitly set them. See the ROUTERS_CONF and MRTG_INFO documentation files for the syntax.

This is detailed in the HOWTO and PROBLEMS files, and touched on in the README as well.

Menus:

When you click the 'options' button, the Devces list goes and instead you see the list of Targets for the current device. It sounds as if one of these is called 'mrtg.', which may be the best guess routers2 can make. I'd need to see the cfg files to know why.

Make sure your master .cfg file is ignored by routers2 (have routers.cgi*Ignore:yes defined in it) and that it includes the other cfg files, not them including it.

When you are viewing the Devices menu, if you see an entry which has a [+] icon, then this is an expandable group. By default, groups will be named according to the last part of their directory name.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Wed Oct 05, 2005 5:39 am 
Offline
Silver User

Joined: Fri Sep 30, 2005 11:31 am
Posts: 10
Using: routers.cgi*ShortDesc[target]:

That one worked. The routers2.conf file that is installed contains ShDesc which you may want to update.

Now, I still cannot seem to change the names as they appear in the "Devices" section. The target names are properly changed now.

I have groups enabled so I see the directory name as the group name (this I'd like to change too if possible). Under this group I currently have two devices. In routers2.conf I set the option routerdefault=hostname. This is all I see right now: the IP addresses of these devices. Adding the routers.cgi*Desc[target] directive works in that it overrides the Title[target] one and the graphs themselves have these titles.

I still would like a ShortDesc[target] type value to show up for the device name instead of whatever 'routerdefault' comes up with, which isn't appropriate.

Now that groups are enabled, I seem to have lost the ability to get an overview of all my devices? Before groups were enabled, the program mistakenly thought all my devices were targets of one single router. This had a fortunate side-effect that "Summary" pages showed all these devices' graphs so I can get an overview of our entire network.

Now that I have one .cfg file for each device, and thus only one target per device, this "feature" is gone now. Or isn't it and I'm just looking in the wrong place now?


Top
 Profile Send private message  
 
 Post subject:
PostPosted: Wed Oct 05, 2005 10:56 am 
Offline
Site Admin

Joined: Tue Jul 29, 2003 11:42 am
Posts: 3039
Location: Auckland, New Zealand
To change the menu entry label for the Device, use:

routers.cgi*ShortDesc: Devicename

(see, without the [targetname] bit).

You can change the group names from the default by placing entries in the routers2.conf, in the [targetnames] section. There are examples there to show you.

The 'routerdefault=hostname' means that the hostname - as used in the cfg file - will be used by default. If you have not given a hostname, then it will use the IP address. If you have not given an IP address, it will try other things. No DNS lookups will be performed as these are big timewasters and can block.

The Summary page only summarises Targets for the current Device. Your network overall summary was more of a feature than a design. If you want something like this again, then you *can* trick things by including the master .cfg file in the cfgfiles directive after all -- then it appears as a 'device' although you probably want to override various definitions and options at the end. I use a similar method to obtain summaries of various host groups here.

_________________
Steve Shipway
UNIX Systems, ITSS, University of Auckland, NZ
Woe unto them that rise up early in the morning... -- Isaiah 5:11


Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC + 12 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group