Network Defaults
-
- Posts: 54
- Joined: Fri Sep 30, 2016 1:51 pm
Network Defaults
I was wondering if there was a way to default the sources summary view to use linear and bytes/sec? While on that topic, I noticed back in 2014 the issue about speed being shown in bytes/sec should be labelled bit/sec but 3+ years later it has been changed. Any idea when that will occur?
-
- Support Tech
- Posts: 5045
- Joined: Tue Feb 07, 2017 11:26 am
Re: Network Defaults
Change lines 87 and 20 in /var/www/html/nagiosna/application/views/generic/summary.php to look like:
Line 87:
<?php echo lang('summary_graph_using'); ?> <label class="radio" style="display: inline-block; margin: 0 0 0 5px; font-weight: bold;"><input type="radio" name="graphalg" va lue="log"><?php echo lang('summary_graph_log'); ?></label> <label class="radio" style="display: inline-block; margin: 0 0 0 5px; font-weight: bold;"><input type="radio" name="graphalg" va lue="linear" checked><?php echo lang('summary_graph_linear'); ?></label>
Line 20:
var yAxis_type = 'linear';
Line 87:
<?php echo lang('summary_graph_using'); ?> <label class="radio" style="display: inline-block; margin: 0 0 0 5px; font-weight: bold;"><input type="radio" name="graphalg" va lue="log"><?php echo lang('summary_graph_log'); ?></label> <label class="radio" style="display: inline-block; margin: 0 0 0 5px; font-weight: bold;"><input type="radio" name="graphalg" va lue="linear" checked><?php echo lang('summary_graph_linear'); ?></label>
Line 20:
var yAxis_type = 'linear';
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 54
- Joined: Fri Sep 30, 2016 1:51 pm
Re: Network Defaults
Ok...that fixes the linear default ...Many thanks. Is there an edit to force bytes/sec as default as opposed to just bytes?
-
- Support Tech
- Posts: 5045
- Joined: Tue Feb 07, 2017 11:26 am
Re: Network Defaults
Transfer rates have been fixed in a couple places. The graph for example will show bytes but queries will return Bits/Second. Where are you seeing a discrepancy? Are you saying the graph should be bits/second as well?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 54
- Joined: Fri Sep 30, 2016 1:51 pm
Re: Network Defaults
Well as the network engineer I am interested in throughput typically measured as bps (Mbps Gbps etc.) . I would like the default view to be in bit/sec. The graph defaults to Bytes. Not a huge issue but a hassle to toggle to Bytes/Sec. Also the graph seems to be in bits/sec but the radio button label still shows bytes/sec. A minor point I realize but when try to explain the discrepancy to others it can become problematic.
-
- Madmin
- Posts: 9190
- Joined: Thu Oct 30, 2014 9:02 am
Re: Network Defaults
To change the label for the Bandwidth graph to say Bits/Sec,
Edit the /var/www/html/nagiosna/www/media/js/summary.js file.
Change line 236
from
to
Save the file and restart apache by running
Refresh the GUI to update the label.
Getting the default changed may need a rewrite of the function.
Edit the /var/www/html/nagiosna/www/media/js/summary.js file.
Change line 236
from
Code: Select all
'q[Bytes/Sec]': "bps" }
Code: Select all
'q[Bits/Sec]': "bps" }
Code: Select all
service httpd restart
Getting the default changed may need a rewrite of the function.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 54
- Joined: Fri Sep 30, 2016 1:51 pm
Re: Network Defaults
Thank you. Will give it a shot. Quick question though. Why, if it is that simple to change, has the interface been reading Bytes/Sec instead of bits/sec if that is truly what is being displayed?
-
- Madmin
- Posts: 9190
- Joined: Thu Oct 30, 2014 9:02 am
Re: Network Defaults
It was just that the label was wrong on the graph. The system is graphing Bits/Sec for the data.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
- Posts: 54
- Joined: Fri Sep 30, 2016 1:51 pm
Re: Network Defaults
I understand. Why is the label still wrong after all these years? is my question.
-
- Madmin
- Posts: 9190
- Joined: Thu Oct 30, 2014 9:02 am
Re: Network Defaults
Because it was missed.
Be sure to check out our Knowledgebase for helpful articles and solutions!