![](https://secure.gravatar.com/avatar/dff951156a4bceb2febe8e0510a7f3bc.jpg?s=120&d=mm&r=g)
The FAQ's and Configuration state that I can display graphs without requiring a username or password. This is great... but... here's the question
I've made the appropriate modifications to config.php, however, what URL do I use to get to the public graphs? I tried looking at the URL of generated images, however, that doesn't seem to be correct.
So you can understand my goal:
I run a colocation company and require my customers to be able to review their bandwidth statistics. I utilize WHMCS and would like them to be able to view their graphs within their portal, thus, I've added the IP address of my WHMCS server as an 'authenticated' IP in config.php I'm thinking, once I can understand how to display the graphs, that I can use the port id as a variable to develop a custom module to display the graphs.
So my questions are:
After permitting an IP address to be able to view graphs without username/password, what is the syntax of the URL for displaying these graphs? It would be awesome to be able to integrate a custom range selection, but I'd really just settle for static generation of past 24 hours, past month, and past year.
![](https://secure.gravatar.com/avatar/dff951156a4bceb2febe8e0510a7f3bc.jpg?s=120&d=mm&r=g)
For example... with the appropriate modifications for ip authentication... should the below generate an image (it does when im logged in, but throws a 500 error when im not, despite coming from the IP that is permitted)
http://MYOBSERVIUMIP/graph.php?to=1336041055&id=7&type=port_bits&...
below is in config.php: $config['allow_unauth_graphs_cidr'] = array('IPADDR/32', 'NETADDR/24');
On Thu, May 3, 2012 at 7:23 AM, Adam Blackington ablackington@lionlink.netwrote:
The FAQ's and Configuration state that I can display graphs without requiring a username or password. This is great... but... here's the question
I've made the appropriate modifications to config.php, however, what URL do I use to get to the public graphs? I tried looking at the URL of generated images, however, that doesn't seem to be correct.
So you can understand my goal:
I run a colocation company and require my customers to be able to review their bandwidth statistics. I utilize WHMCS and would like them to be able to view their graphs within their portal, thus, I've added the IP address of my WHMCS server as an 'authenticated' IP in config.php I'm thinking, once I can understand how to display the graphs, that I can use the port id as a variable to develop a custom module to display the graphs.
So my questions are:
After permitting an IP address to be able to view graphs without username/password, what is the syntax of the URL for displaying these graphs? It would be awesome to be able to integrate a custom range selection, but I'd really just settle for static generation of past 24 hours, past month, and past year.
![](https://secure.gravatar.com/avatar/21caf0a08d095be7196a1648d20942be.jpg?s=120&d=mm&r=g)
An error 500 should never occur, this means your webserver "died" trying to get you a page; the URLs for the graphs are exactly the same, so what you were trying is correct.
Please check your apache error log to see what goes wrong?
Tom
On Thu, 2012-05-03 at 08:03 -0400, Adam Blackington wrote:
For example... with the appropriate modifications for ip authentication... should the below generate an image (it does when im logged in, but throws a 500 error when im not, despite coming from the IP that is permitted)
http://MYOBSERVIUMIP/graph.php?to=1336041055&id=7&type=port_bits&...
below is in config.php: $config['allow_unauth_graphs_cidr'] = array('IPADDR/32', 'NETADDR/24');
On Thu, May 3, 2012 at 7:23 AM, Adam Blackington ablackington@lionlink.net wrote: The FAQ's and Configuration state that I can display graphs without requiring a username or password. This is great... but... here's the question
I've made the appropriate modifications to config.php, however, what URL do I use to get to the public graphs? I tried looking at the URL of generated images, however, that doesn't seem to be correct. So you can understand my goal: I run a colocation company and require my customers to be able to review their bandwidth statistics. I utilize WHMCS and would like them to be able to view their graphs within their portal, thus, I've added the IP address of my WHMCS server as an 'authenticated' IP in config.php I'm thinking, once I can understand how to display the graphs, that I can use the port id as a variable to develop a custom module to display the graphs. So my questions are: After permitting an IP address to be able to view graphs without username/password, what is the syntax of the URL for displaying these graphs? It would be awesome to be able to integrate a custom range selection, but I'd really just settle for static generation of past 24 hours, past month, and past year.
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
![](https://secure.gravatar.com/avatar/dff951156a4bceb2febe8e0510a7f3bc.jpg?s=120&d=mm&r=g)
To clarify-- the 500 does not occur when I am logged in, but does occur when i am not logged in. The image displays properly when logged in/throws 500 when I'm not.
Checked apache logs.... the only error it throws is a no favicon: [Thu May 03 08:32:52 2012] [error] [client xxx.xxx.xxx.xxx] File does not exist: /opt/observium/html/favicon.ico NET-SNMP version: 5.4.3 [Thu May 03 08:32:58 2012] [error] [client xxx.xxx.xxx.xxx] File does not exist: /opt/observium/html/favicon.ico NET-SNMP version: 5.4.3
On Thu, May 3, 2012 at 8:26 AM, Tom Laermans tom.laermans@powersource.cxwrote:
An error 500 should never occur, this means your webserver "died" trying to get you a page; the URLs for the graphs are exactly the same, so what you were trying is correct.
Please check your apache error log to see what goes wrong?
Tom
On Thu, 2012-05-03 at 08:03 -0400, Adam Blackington wrote:
For example... with the appropriate modifications for ip authentication... should the below generate an image (it does when im logged in, but throws a 500 error when im not, despite coming from the IP that is permitted)
http://MYOBSERVIUMIP/graph.php?to=1336041055&id=7&type=port_bits&...
below is in config.php: $config['allow_unauth_graphs_cidr'] = array('IPADDR/32', 'NETADDR/24');
On Thu, May 3, 2012 at 7:23 AM, Adam Blackington ablackington@lionlink.net wrote: The FAQ's and Configuration state that I can display graphs without requiring a username or password. This is great... but... here's the question
I've made the appropriate modifications to config.php, however, what URL do I use to get to the public graphs? I tried looking at the URL of generated images, however, that doesn't seem to be correct. So you can understand my goal: I run a colocation company and require my customers to be able to review their bandwidth statistics. I utilize WHMCS and would like them to be able to view their graphs within their portal, thus, I've added the IP address of my WHMCS server as an 'authenticated' IP in config.php I'm thinking, once I can understand how to display the graphs, that I can use the port id as a variable to develop a custom module to display the graphs. So my questions are: After permitting an IP address to be able to view graphs without username/password, what is the syntax of the URL for displaying these graphs? It would be awesome to be able to integrate a custom range selection, but I'd really just settle for static generation of past 24 hours, past month, and past year.
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
![](https://secure.gravatar.com/avatar/dff951156a4bceb2febe8e0510a7f3bc.jpg?s=120&d=mm&r=g)
CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /device/device=1/tab=port/port=60/ HTTP/1.1" 200 6720 " http://OBSERVIUM.IP/ports/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?height=45&width=150&to=1336048363&id=1&type=device_processor&from=1335961963&legend=no&popup_title=&bg=FFFFFF00 HTTP/1.1" 200 1384 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?type=port_bits&id=60&from=1335961963&to=1336048363&width=100&height=20&legend=no&bg=ffffff HTTP/1.1" 200 928 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?height=45&width=150&to=1336048363&id=1&type=device_mempool&from=1335961963&legend=no&popup_title=&bg=FFFFFF00 HTTP/1.1" 200 569 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?type=port_errors&id=60&from=1335961963&to=1336048363&width=100&height=20&legend=no&bg=ffffff HTTP/1.1" 200 511 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?height=100&width=215&to=1336048363&id=60&type=port_bits&from=1335961963 HTTP/1.1" 200 11995 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?height=100&width=215&to=1336048363&id=60&type=port_bits&from=1335443563 HTTP/1.1" 200 15335 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?height=100&width=215&to=1336048363&id=60&type=port_bits&from=1333369963 HTTP/1.1" 200 17489 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?type=port_upkts&id=60&from=1335961963&to=1336048363&width=100&height=20&legend=no&bg=ffffff HTTP/1.1" 200 1664 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?height=100&width=215&to=1336048363&id=60&type=port_upkts&from=1335961963 HTTP/1.1" 200 14629 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19"
On Thu, May 3, 2012 at 8:35 AM, Adam Blackington ablackington@lionlink.netwrote:
To clarify-- the 500 does not occur when I am logged in, but does occur when i am not logged in. The image displays properly when logged in/throws 500 when I'm not.
Checked apache logs.... the only error it throws is a no favicon: [Thu May 03 08:32:52 2012] [error] [client xxx.xxx.xxx.xxx] File does not exist: /opt/observium/html/favicon.ico NET-SNMP version: 5.4.3 [Thu May 03 08:32:58 2012] [error] [client xxx.xxx.xxx.xxx] File does not exist: /opt/observium/html/favicon.ico NET-SNMP version: 5.4.3
On Thu, May 3, 2012 at 8:26 AM, Tom Laermans tom.laermans@powersource.cxwrote:
An error 500 should never occur, this means your webserver "died" trying to get you a page; the URLs for the graphs are exactly the same, so what you were trying is correct.
Please check your apache error log to see what goes wrong?
Tom
On Thu, 2012-05-03 at 08:03 -0400, Adam Blackington wrote:
For example... with the appropriate modifications for ip authentication... should the below generate an image (it does when im logged in, but throws a 500 error when im not, despite coming from the IP that is permitted)
http://MYOBSERVIUMIP/graph.php?to=1336041055&id=7&type=port_bits&...
below is in config.php: $config['allow_unauth_graphs_cidr'] = array('IPADDR/32', 'NETADDR/24');
On Thu, May 3, 2012 at 7:23 AM, Adam Blackington ablackington@lionlink.net wrote: The FAQ's and Configuration state that I can display graphs without requiring a username or password. This is great... but... here's the question
I've made the appropriate modifications to config.php, however, what URL do I use to get to the public graphs? I tried looking at the URL of generated images, however, that doesn't seem to be correct. So you can understand my goal: I run a colocation company and require my customers to be able to review their bandwidth statistics. I utilize WHMCS and would like them to be able to view their graphs within their portal, thus, I've added the IP address of my WHMCS server as an 'authenticated' IP in config.php I'm thinking, once I can understand how to display the graphs, that I can use the port id as a variable to develop a custom module to display the graphs. So my questions are: After permitting an IP address to be able to view graphs without username/password, what is the syntax of the URL for displaying these graphs? It would be awesome to be able to integrate a custom range selection, but I'd really just settle for static generation of past 24 hours, past month, and past year.
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
![](https://secure.gravatar.com/avatar/dff951156a4bceb2febe8e0510a7f3bc.jpg?s=120&d=mm&r=g)
Any input? * *
On Thu, May 3, 2012 at 8:44 AM, Adam Blackington ablackington@lionlink.netwrote:
CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /device/device=1/tab=port/port=60/ HTTP/1.1" 200 6720 " http://OBSERVIUM.IP/ports/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?height=45&width=150&to=1336048363&id=1&type=device_processor&from=1335961963&legend=no&popup_title=&bg=FFFFFF00 HTTP/1.1" 200 1384 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?type=port_bits&id=60&from=1335961963&to=1336048363&width=100&height=20&legend=no&bg=ffffff HTTP/1.1" 200 928 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?height=45&width=150&to=1336048363&id=1&type=device_mempool&from=1335961963&legend=no&popup_title=&bg=FFFFFF00 HTTP/1.1" 200 569 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?type=port_errors&id=60&from=1335961963&to=1336048363&width=100&height=20&legend=no&bg=ffffff HTTP/1.1" 200 511 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?height=100&width=215&to=1336048363&id=60&type=port_bits&from=1335961963 HTTP/1.1" 200 11995 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?height=100&width=215&to=1336048363&id=60&type=port_bits&from=1335443563 HTTP/1.1" 200 15335 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?height=100&width=215&to=1336048363&id=60&type=port_bits&from=1333369963 HTTP/1.1" 200 17489 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?type=port_upkts&id=60&from=1335961963&to=1336048363&width=100&height=20&legend=no&bg=ffffff HTTP/1.1" 200 1664 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?height=100&width=215&to=1336048363&id=60&type=port_upkts&from=1335961963 HTTP/1.1" 200 14629 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19"
On Thu, May 3, 2012 at 8:35 AM, Adam Blackington < ablackington@lionlink.net> wrote:
To clarify-- the 500 does not occur when I am logged in, but does occur when i am not logged in. The image displays properly when logged in/throws 500 when I'm not.
Checked apache logs.... the only error it throws is a no favicon: [Thu May 03 08:32:52 2012] [error] [client xxx.xxx.xxx.xxx] File does not exist: /opt/observium/html/favicon.ico NET-SNMP version: 5.4.3 [Thu May 03 08:32:58 2012] [error] [client xxx.xxx.xxx.xxx] File does not exist: /opt/observium/html/favicon.ico NET-SNMP version: 5.4.3
On Thu, May 3, 2012 at 8:26 AM, Tom Laermans <tom.laermans@powersource.cx
wrote:
An error 500 should never occur, this means your webserver "died" trying to get you a page; the URLs for the graphs are exactly the same, so what you were trying is correct.
Please check your apache error log to see what goes wrong?
Tom
On Thu, 2012-05-03 at 08:03 -0400, Adam Blackington wrote:
For example... with the appropriate modifications for ip authentication... should the below generate an image (it does when im logged in, but throws a 500 error when im not, despite coming from the IP that is permitted)
http://MYOBSERVIUMIP/graph.php?to=1336041055&id=7&type=port_bits&...
below is in config.php: $config['allow_unauth_graphs_cidr'] = array('IPADDR/32', 'NETADDR/24');
On Thu, May 3, 2012 at 7:23 AM, Adam Blackington ablackington@lionlink.net wrote: The FAQ's and Configuration state that I can display graphs without requiring a username or password. This is great... but... here's the question
I've made the appropriate modifications to config.php, however, what URL do I use to get to the public graphs? I tried looking at the URL of generated images, however, that doesn't seem to be correct. So you can understand my goal: I run a colocation company and require my customers to be able to review their bandwidth statistics. I utilize WHMCS and would like them to be able to view their graphs within their portal, thus, I've added the IP address of my WHMCS server as an 'authenticated' IP in config.php I'm thinking, once I can understand how to display the graphs, that I can use the port id as a variable to develop a custom module to display the graphs. So my questions are: After permitting an IP address to be able to view graphs without username/password, what is the syntax of the URL for displaying these graphs? It would be awesome to be able to integrate a custom range selection, but I'd really just settle for static generation of past 24 hours, past month, and past year.
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
![](https://secure.gravatar.com/avatar/0fa97865a0e1ab36152b6b2299eedb49.jpg?s=120&d=mm&r=g)
None of these logs seem relevant. None of them show you directly accessing graph.php
Adam
![](https://secure.gravatar.com/avatar/dff951156a4bceb2febe8e0510a7f3bc.jpg?s=120&d=mm&r=g)
Is this not looking right? ::
CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?type=port_upkts&id=60&from=1335961963&to= 1336048363&width=100&height=20&legend=no&bg=ffffff HTTP/1.1" 200 1664 " http://OBSERVIUM.IP/device/device=1/tab=port/port=60/http://observium.ip/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) * *
On Fri, May 4, 2012 at 3:20 PM, Adam Armstrong adama@memetic.org wrote:
** None of these logs seem relevant. None of them show you directly accessing graph.php
Adam
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
Adam Blackington ablackington@lionlink.net wrote:
Any input?
On Thu, May 3, 2012 at 8:44 AM, Adam Blackington < ablackington@lionlink.net> wrote:
CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /device/device=1/tab=port/port=60/ HTTP/1.1" 200 6720 " http://OBSERVIUM.IP/ports/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?height=45&width=150&to=1336048363&id=1&type=device_processor&from=1335961963&legend=no&popup_title=&bg=FFFFFF00 HTTP/1.1" 200 1384 " http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?type=port_bits&id=60&from=1335961963&to=1336048363&width=100&height=20&legend=no&bg=ffffff HTTP/1.1" 200 928 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?height=45&width=150&to=1336048363&id=1&type=device_mempool&from=1335961963&legend=no&popup_title=&bg=FFFFFF00 HTTP/1.1" 200 569 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?type=port_errors&id=60&from=1335961963&to=1336048363&width=100&height=20&legend=no&bg=ffffff HTTP/1.1" 200 511 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?height=100&width=215&to=1336048363&id=60&type=port_bits&from=1335961963 HTTP/1.1" 200 11995 " http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?height=100&width=215&to=1336048363&id=60&type=port_bits&from=1335443563 HTTP/1.1" 200 15335 " http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?height=100&width=215&to=1336048363&id=60&type=port_bits&from=1333369963 HTTP/1.1" 200 17489 " http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?type=port_upkts&id=60&from=1335961963&to=1336048363&width=100&height=20&legend=no&bg=ffffff HTTP/1.1" 200 1664 " http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19" CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?height=100&width=215&to=1336048363&id=60&type=port_upkts&from=1335961963 HTTP/1.1" 200 14629 " http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.168 Safari/535.19"
On Thu, May 3, 2012 at 8:35 AM, Adam Blackington < ablackington@lionlink.net> wrote:
To clarify-- the 500 does not occur when I am logged in, but does occur when i am not logged in. The image displays properly when logged in/throws 500 when I'm not.
Checked apache logs.... the only error it throws is a no favicon: [Thu May 03 08:32:52 2012] [error] [client xxx.xxx.xxx.xxx] File does not exist: /opt/observium/html/favicon.ico NET-SNMP version: 5.4.3 [Thu May 03 08:32:58 2012] [error] [client xxx.xxx.xxx.xxx] File does not exist: /opt/observium/html/favicon.ico NET-SNMP version: 5.4.3
On Thu, May 3, 2012 at 8:26 AM, Tom Laermans < tom.laermans@powersource.cx> wrote:
An error 500 should never occur, this means your webserver "died" trying to get you a page; the URLs for the graphs are exactly the same, so what you were trying is correct.
Please check your apache error log to see what goes wrong?
Tom
On Thu, 2012-05-03 at 08:03 -0400, Adam Blackington wrote:
For example... with the appropriate modifications for ip authentication... should the below generate an image (it does when im logged in, but throws a 500 error when im not, despite coming from
the
IP that is permitted)
http://MYOBSERVIUMIP/graph.php?to=1336041055&id=7&type=port_bits&...
below is in config.php: $config['allow_unauth_graphs_cidr'] = array('IPADDR/32', 'NETADDR/24');
On Thu, May 3, 2012 at 7:23 AM, Adam Blackington ablackington@lionlink.net wrote: The FAQ's and Configuration state that I can display graphs without requiring a username or password. This is great... but... here's the question
I've made the appropriate modifications to config.php, however, what URL do I use to get to the public graphs? I tried looking at the URL of generated images, however, that doesn't seem to be correct. So you can understand my goal: I run a colocation company and require my customers to be
able
to review their bandwidth statistics. I utilize WHMCS and would like them to be able to view their graphs within their portal, thus, I've added the IP address
of
my WHMCS server as an 'authenticated' IP in config.php I'm thinking, once I can understand how to display the
graphs,
that I can use the port id as a variable to develop a custom module to display the graphs. So my questions are: After permitting an IP address to be able to view graphs without username/password, what is the syntax of the URL for displaying these graphs? It would be awesome to be able to integrate a custom range selection, but I'd really just settle for static generation
of
past 24 hours, past month, and past year.
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
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
![](https://secure.gravatar.com/avatar/21caf0a08d095be7196a1648d20942be.jpg?s=120&d=mm&r=g)
That's a correct line, but it's HTTP 200, not 500... I didn't see any 500s in the log, but I read it from my cellphone so I could have overlooked :)
Tom
On Fri, 2012-05-04 at 15:27 -0400, Adam Blackington wrote:
Is this not looking right? ::
CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?type=port_upkts&id=60&from=1335961963&to=1336048363&width=100&height=20&legend=no&bg=ffffff HTTP/1.1" 200 1664 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64)
On Fri, May 4, 2012 at 3:20 PM, Adam Armstrong adama@memetic.org wrote: None of these logs seem relevant. None of them show you directly accessing graph.php
Adam _______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
![](https://secure.gravatar.com/avatar/21caf0a08d095be7196a1648d20942be.jpg?s=120&d=mm&r=g)
Also, that's indeed as Adam said not a direct access to graph.php as the referer is filled out :-)
Tom
On 4/05/2012 22:32, Tom Laermans wrote:
That's a correct line, but it's HTTP 200, not 500... I didn't see any 500s in the log, but I read it from my cellphone so I could have overlooked :)
Tom
On Fri, 2012-05-04 at 15:27 -0400, Adam Blackington wrote:
Is this not looking right? ::
CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?type=port_upkts&id=60&from=1335961963&to=1336048363&width=100&height=20&legend=no&bg=ffffff HTTP/1.1" 200 1664 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64)
On Fri, May 4, 2012 at 3:20 PM, Adam Armstrongadama@memetic.org wrote: None of these logs seem relevant. None of them show you directly accessing graph.php
Adam _______________________________________________ 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
![](https://secure.gravatar.com/avatar/9d9d732b747ab460e1d07a746306d7e7.jpg?s=120&d=mm&r=g)
Funnily enough I just tried to use this idea too (I want to export a graph to my external webserver, so am running a small script to grab the graph every hour and upload it to my public server).
And I've hit the same problem with grabbing the graph.php directly and not via an authenticated login.
I enabled debug and think I've found two problems:
Hitting: mylan/graph.php?height=100&width=215&id=1&type=application_heyu_darkstate&debug=true
It gives me: Fatal error: Call to undefined function graph_error() in /opt/observium/html/graph.php on line 47
So I assume this is the problem the OP was having but hadn't tried enabling debug, so that should be easy to fix.
The second problem I think might just be my interpretation of the config options. In config.php I have put: $config['allow_unauth_graphs'] = 0; $config['allow_unauth_graphs_cidr'] = array("192.168.55.0/24");
But I suspect this may be the confusion, should allow_unauth_graphs be set to 1 AND something in the cidr array? Reason I ask is because in graph.php the auth part only has:
if (isset($config['allow_unauth_graphs']) && $config['allow_unauth_graphs']) { $auth = "1"; ## hardcode auth for all with config function } else { if (!$_SESSION['authenticated']) { graph_error("Session not authenticated"); exit; } }
So I assume the CIDR thing is new/not fully implemented yet?
Cheers :)
On 04/05/12 22:47, Tom Laermans wrote:
Also, that's indeed as Adam said not a direct access to graph.php as the referer is filled out :-)
Tom
On 4/05/2012 22:32, Tom Laermans wrote:
That's a correct line, but it's HTTP 200, not 500... I didn't see any 500s in the log, but I read it from my cellphone so I could have overlooked :)
Tom
On Fri, 2012-05-04 at 15:27 -0400, Adam Blackington wrote:
Is this not looking right? ::
CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?type=port_upkts&id=60&from=1335961963&to=1336048363&width=100&height=20&legend=no&bg=ffffff HTTP/1.1" 200 1664 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64)
On Fri, May 4, 2012 at 3:20 PM, Adam Armstrongadama@memetic.org wrote: None of these logs seem relevant. None of them show you directly accessing graph.php
Adam _______________________________________________ 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
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
![](https://secure.gravatar.com/avatar/0fa97865a0e1ab36152b6b2299eedb49.jpg?s=120&d=mm&r=g)
The CIDR option was broken until I fixed it last week in r3169 :D
http://fisheye.observium.org/browse/Observium/html/includes/graphs/graph.inc...
Those two config options are separate. The CIDR stuff was broken because the code below was exit()ing before it could be tested.
:D
adam.
On 2012-05-15 10:19, Andy Brown wrote:
Funnily enough I just tried to use this idea too (I want to export a graph to my external webserver, so am running a small script to grab the graph every hour and upload it to my public server).
And I've hit the same problem with grabbing the graph.php directly and not via an authenticated login.
I enabled debug and think I've found two problems:
Hitting: mylan/graph.php?height=100&width=215&id=1&type=application_heyu_darkstate&debug=true
It gives me: Fatal error: Call to undefined function graph_error() in /opt/observium/html/graph.php on line 47
So I assume this is the problem the OP was having but hadn't tried enabling debug, so that should be easy to fix.
The second problem I think might just be my interpretation of the config options. In config.php I have put: $config['allow_unauth_graphs'] = 0; $config['allow_unauth_graphs_cidr'] = array("192.168.55.0/24");
But I suspect this may be the confusion, should allow_unauth_graphs be set to 1 AND something in the cidr array? Reason I ask is because in graph.php the auth part only has:
if (isset($config['allow_unauth_graphs'])&& $config['allow_unauth_graphs']) { $auth = "1"; ## hardcode auth for all with config function } else { if (!$_SESSION['authenticated']) { graph_error("Session not authenticated"); exit; } }
So I assume the CIDR thing is new/not fully implemented yet?
Cheers :)
On 04/05/12 22:47, Tom Laermans wrote:
Also, that's indeed as Adam said not a direct access to graph.php as the referer is filled out :-)
Tom
On 4/05/2012 22:32, Tom Laermans wrote:
That's a correct line, but it's HTTP 200, not 500... I didn't see any 500s in the log, but I read it from my cellphone so I could have overlooked :)
Tom
On Fri, 2012-05-04 at 15:27 -0400, Adam Blackington wrote:
Is this not looking right? ::
CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?type=port_upkts&id=60&from=1335961963&to=1336048363&width=100&height=20&legend=no&bg=ffffff HTTP/1.1" 200 1664 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64)
On Fri, May 4, 2012 at 3:20 PM, Adam Armstrongadama@memetic.org wrote: None of these logs seem relevant. None of them show you directly accessing graph.php
Adam _______________________________________________ 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
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
![](https://secure.gravatar.com/avatar/9d9d732b747ab460e1d07a746306d7e7.jpg?s=120&d=mm&r=g)
Ta, Will pull the latest then as I've shifted onto vhost based to get around the other stuff I chatting with you recently about :)
Cheers Andy
On 15/05/12 12:55, Adam Armstrong wrote:
The CIDR option was broken until I fixed it last week in r3169 :D
http://fisheye.observium.org/browse/Observium/html/includes/graphs/graph.inc...
Those two config options are separate. The CIDR stuff was broken because the code below was exit()ing before it could be tested.
:D
adam.
On 2012-05-15 10:19, Andy Brown wrote:
Funnily enough I just tried to use this idea too (I want to export a graph to my external webserver, so am running a small script to grab the graph every hour and upload it to my public server).
And I've hit the same problem with grabbing the graph.php directly and not via an authenticated login.
I enabled debug and think I've found two problems:
Hitting: mylan/graph.php?height=100&width=215&id=1&type=application_heyu_darkstate&debug=true
It gives me: Fatal error: Call to undefined function graph_error() in /opt/observium/html/graph.php on line 47
So I assume this is the problem the OP was having but hadn't tried enabling debug, so that should be easy to fix.
The second problem I think might just be my interpretation of the config options. In config.php I have put: $config['allow_unauth_graphs'] = 0; $config['allow_unauth_graphs_cidr'] = array("192.168.55.0/24");
But I suspect this may be the confusion, should allow_unauth_graphs be set to 1 AND something in the cidr array? Reason I ask is because in graph.php the auth part only has:
if (isset($config['allow_unauth_graphs'])&& $config['allow_unauth_graphs']) { $auth = "1"; ## hardcode auth for all with config function } else { if (!$_SESSION['authenticated']) { graph_error("Session not authenticated"); exit; } }
So I assume the CIDR thing is new/not fully implemented yet?
Cheers :)
On 04/05/12 22:47, Tom Laermans wrote:
Also, that's indeed as Adam said not a direct access to graph.php as the referer is filled out :-)
Tom
On 4/05/2012 22:32, Tom Laermans wrote:
That's a correct line, but it's HTTP 200, not 500... I didn't see any 500s in the log, but I read it from my cellphone so I could have overlooked :)
Tom
On Fri, 2012-05-04 at 15:27 -0400, Adam Blackington wrote:
Is this not looking right? ::
CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?type=port_upkts&id=60&from=1335961963&to=1336048363&width=100&height=20&legend=no&bg=ffffff
HTTP/1.1" 200 1664 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64)
On Fri, May 4, 2012 at 3:20 PM, Adam Armstrongadama@memetic.org wrote: None of these logs seem relevant. None of them show you directly accessing graph.php
Adam _______________________________________________ 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
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
![](https://secure.gravatar.com/avatar/0fa97865a0e1ab36152b6b2299eedb49.jpg?s=120&d=mm&r=g)
haha. adama always wins! \o/
On 2012-05-15 13:34, Andy Brown wrote:
Ta, Will pull the latest then as I've shifted onto vhost based to get around the other stuff I chatting with you recently about :)
Cheers Andy
On 15/05/12 12:55, Adam Armstrong wrote:
The CIDR option was broken until I fixed it last week in r3169 :D
http://fisheye.observium.org/browse/Observium/html/includes/graphs/graph.inc...
Those two config options are separate. The CIDR stuff was broken because the code below was exit()ing before it could be tested.
:D
adam.
On 2012-05-15 10:19, Andy Brown wrote:
Funnily enough I just tried to use this idea too (I want to export a graph to my external webserver, so am running a small script to grab the graph every hour and upload it to my public server).
And I've hit the same problem with grabbing the graph.php directly and not via an authenticated login.
I enabled debug and think I've found two problems:
Hitting: mylan/graph.php?height=100&width=215&id=1&type=application_heyu_darkstate&debug=true
It gives me: Fatal error: Call to undefined function graph_error() in /opt/observium/html/graph.php on line 47
So I assume this is the problem the OP was having but hadn't tried enabling debug, so that should be easy to fix.
The second problem I think might just be my interpretation of the config options. In config.php I have put: $config['allow_unauth_graphs'] = 0; $config['allow_unauth_graphs_cidr'] = array("192.168.55.0/24");
But I suspect this may be the confusion, should allow_unauth_graphs be set to 1 AND something in the cidr array? Reason I ask is because in graph.php the auth part only has:
if (isset($config['allow_unauth_graphs'])&& $config['allow_unauth_graphs']) { $auth = "1"; ## hardcode auth for all with config function } else { if (!$_SESSION['authenticated']) { graph_error("Session not authenticated"); exit; } }
So I assume the CIDR thing is new/not fully implemented yet?
Cheers :)
On 04/05/12 22:47, Tom Laermans wrote:
Also, that's indeed as Adam said not a direct access to graph.php as the referer is filled out :-)
Tom
On 4/05/2012 22:32, Tom Laermans wrote:
That's a correct line, but it's HTTP 200, not 500... I didn't see any 500s in the log, but I read it from my cellphone so I could have overlooked :)
Tom
On Fri, 2012-05-04 at 15:27 -0400, Adam Blackington wrote:
Is this not looking right? ::
CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?type=port_upkts&id=60&from=1335961963&to=1336048363&width=100&height=20&legend=no&bg=ffffff
HTTP/1.1" 200 1664 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64)
On Fri, May 4, 2012 at 3:20 PM, Adam Armstrongadama@memetic.org wrote: None of these logs seem relevant. None of them show you directly accessing graph.php
Adam _______________________________________________ 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
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
![](https://secure.gravatar.com/avatar/dff951156a4bceb2febe8e0510a7f3bc.jpg?s=120&d=mm&r=g)
Now that the CIDR fix has been implemented, can anyone tell me how to generate the from and to attributes in the URL? I dont understand how those attributes are calculated? Once I do, I'll be golden!
graph.php?to=*1337760941*&id=4&type=port_bits&from=*1337674541* &height=300&width=1075
Thanks, Adam
On Tue, May 15, 2012 at 11:19 AM, Adam Armstrong adama@memetic.org wrote:
haha. adama always wins! \o/
On 2012-05-15 13:34, Andy Brown wrote:
Ta, Will pull the latest then as I've shifted onto vhost based to get around the other stuff I chatting with you recently about :)
Cheers Andy
On 15/05/12 12:55, Adam Armstrong wrote:
The CIDR option was broken until I fixed it last week in r3169 :D
http://fisheye.observium.org/**browse/Observium/html/** includes/graphs/graph.inc.php?**hb=truehttp://fisheye.observium.org/browse/Observium/html/includes/graphs/graph.inc.php?hb=true
Those two config options are separate. The CIDR stuff was broken because the code below was exit()ing before it could be tested.
:D
adam.
On 2012-05-15 10:19, Andy Brown wrote:
Funnily enough I just tried to use this idea too (I want to export a graph to my external webserver, so am running a small script to grab the graph every hour and upload it to my public server).
And I've hit the same problem with grabbing the graph.php directly and not via an authenticated login.
I enabled debug and think I've found two problems:
Hitting: mylan/graph.php?height=100&**width=215&id=1&type=** application_heyu_darkstate&**debug=true
It gives me: Fatal error: Call to undefined function graph_error() in /opt/observium/html/graph.php on line 47
So I assume this is the problem the OP was having but hadn't tried enabling debug, so that should be easy to fix.
The second problem I think might just be my interpretation of the config options. In config.php I have put: $config['allow_unauth_graphs'] = 0; $config['allow_unauth_graphs_**cidr'] = array("192.168.55.0/24");
But I suspect this may be the confusion, should allow_unauth_graphs be set to 1 AND something in the cidr array? Reason I ask is because in graph.php the auth part only has:
if (isset($config['allow_unauth_**graphs'])&& $config['allow_unauth_graphs']**) { $auth = "1"; ## hardcode auth for all with config function } else { if (!$_SESSION['authenticated']) { graph_error("Session not authenticated"); exit; } }
So I assume the CIDR thing is new/not fully implemented yet?
Cheers :)
On 04/05/12 22:47, Tom Laermans wrote:
Also, that's indeed as Adam said not a direct access to graph.php as the referer is filled out :-)
Tom
On 4/05/2012 22:32, Tom Laermans wrote:
That's a correct line, but it's HTTP 200, not 500... I didn't see any 500s in the log, but I read it from my cellphone so I could have overlooked :)
Tom
On Fri, 2012-05-04 at 15:27 -0400, Adam Blackington wrote:
> Is this not looking right? :: > > > > CLIENT.IP - - [03/May/2012:08:32:43 -0400] > "GET > /graph.php?type=port_upkts&id=**60&from=1335961963&to=** > 1336048363&width=100&height=**20&legend=no&bg=ffffff > > HTTP/1.1" 200 1664 > "http://OBSERVIUM.IP/device/**device=1/tab=port/port=60/http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" > "Mozilla/5.0 > (Windows NT 6.1; WOW64) > > > > > > On Fri, May 4, 2012 at 3:20 PM, Adam Armstrongadama@memetic.org > wrote: > None of these logs seem relevant. None of them show you > directly accessing graph.php > > Adam > ______________________________**_________________ > observium mailing list > observium@observium.org > > http://postman.memetic.org/**cgi-bin/mailman/listinfo/**observiumhttp://postman.memetic.org/cgi-bin/mailman/listinfo/observium > > > > ______________________________**_________________ observium mailing list observium@observium.org http://postman.memetic.org/**cgi-bin/mailman/listinfo/**observiumhttp://postman.memetic.org/cgi-bin/mailman/listinfo/observium
______________________________**_________________ observium mailing list observium@observium.org http://postman.memetic.org/**cgi-bin/mailman/listinfo/**observiumhttp://postman.memetic.org/cgi-bin/mailman/listinfo/observium
______________________________**_________________
observium mailing list observium@observium.org http://postman.memetic.org/**cgi-bin/mailman/listinfo/**observiumhttp://postman.memetic.org/cgi-bin/mailman/listinfo/observium
______________________________**_________________ observium mailing list observium@observium.org http://postman.memetic.org/**cgi-bin/mailman/listinfo/**observiumhttp://postman.memetic.org/cgi-bin/mailman/listinfo/observium
![](https://secure.gravatar.com/avatar/0fa97865a0e1ab36152b6b2299eedb49.jpg?s=120&d=mm&r=g)
They're Unixtime in seconds. Php time()
![](https://secure.gravatar.com/avatar/dff951156a4bceb2febe8e0510a7f3bc.jpg?s=120&d=mm&r=g)
thanks Adam.... on an interface graph's page is the calendar tool allowing users to manipulate the graph. In what file(s) is that tool defined? i can't seem to find where it's referenced.
On Wed, May 23, 2012 at 4:52 AM, Adam Armstrong adama@memetic.org wrote:
** They're Unixtime in seconds. Php time()
-- Sent from my Android phone with K-9 Mail. Please excuse my brevity.
Adam Blackington ablackington@lionlink.net wrote:
Now that the CIDR fix has been implemented, can anyone tell me how to generate the from and to attributes in the URL? I dont understand how those attributes are calculated? Once I do, I'll be golden!
graph.php?to=*1337760941*&id=4&type=port_bits&from=*1337674541* &height=300&width=1075
Thanks, Adam
On Tue, May 15, 2012 at 11:19 AM, Adam Armstrong adama@memetic.orgwrote:
haha. adama always wins! \o/
On 2012-05-15 13:34, Andy Brown wrote:
Ta, Will pull the latest then as I've shifted onto vhost based to get around the other stuff I chatting with you recently about :)
Cheers Andy
On 15/05/12 12:55, Adam Armstrong wrote:
The CIDR option was broken until I fixed it last week in r3169 :D
http://fisheye.observium.org/**browse/Observium/html/** includes/graphs/graph.inc.php?**hb=truehttp://fisheye.observium.org/browse/Observium/html/includes/graphs/graph.inc.php?hb=true
Those two config options are separate. The CIDR stuff was broken because the code below was exit()ing before it could be tested.
:D
adam.
On 2012-05-15 10:19, Andy Brown wrote:
Funnily enough I just tried to use this idea too (I want to export a graph to my external webserver, so am running a small script to grab the graph every hour and upload it to my public server).
And I've hit the same problem with grabbing the graph.php directly and not via an authenticated login.
I enabled debug and think I've found two problems:
Hitting: mylan/graph.php?height=100&**width=215&id=1&type=** application_heyu_darkstate&**debug=true
It gives me: Fatal error: Call to undefined function graph_error() in /opt/observium/html/graph.php on line 47
So I assume this is the problem the OP was having but hadn't tried enabling debug, so that should be easy to fix.
The second problem I think might just be my interpretation of the config options. In config.php I have put: $config['allow_unauth_graphs'] = 0; $config['allow_unauth_graphs_**cidr'] = array("192.168.55.0/24");
But I suspect this may be the confusion, should allow_unauth_graphs be set to 1 AND something in the cidr array? Reason I ask is because in graph.php the auth part only has:
if (isset($config['allow_unauth_**graphs'])&& $config['allow_unauth_graphs']**) { $auth = "1"; ## hardcode auth for all with config function } else { if (!$_SESSION['authenticated']) { graph_error("Session not authenticated"); exit; } }
So I assume the CIDR thing is new/not fully implemented yet?
Cheers :)
On 04/05/12 22:47, Tom Laermans wrote:
> Also, that's indeed as Adam said not a direct access to graph.php as > the > referer is filled out :-) > > Tom > > On 4/05/2012 22:32, Tom Laermans wrote: > >> That's a correct line, but it's HTTP 200, not 500... >> I didn't see any 500s in the log, but I read it from my cellphone >> so I >> could have overlooked :) >> >> Tom >> >> On Fri, 2012-05-04 at 15:27 -0400, Adam Blackington wrote: >> >>> Is this not looking right? :: >>> >>> >>> >>> CLIENT.IP - - [03/May/2012:08:32:43 -0400] >>> "GET >>> /graph.php?type=port_upkts&id=**60&from=1335961963&to=** >>> 1336048363&width=100&height=**20&legend=no&bg=ffffff >>> >>> HTTP/1.1" 200 1664 >>> "http://OBSERVIUM.IP/device/**device=1/tab=port/port=60/http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" >>> "Mozilla/5.0 >>> (Windows NT 6.1; WOW64) >>> >>> >>> >>> >>> >>> On Fri, May 4, 2012 at 3:20 PM, Adam Armstrongadama@memetic.org >>> wrote: >>> None of these logs seem relevant. None of them show you >>> directly accessing graph.php >>> >>> Adam >>> ______________________________**_________________ >>> observium mailing list >>> observium@observium.org >>> >>> http://postman.memetic.org/**cgi-bin/mailman/listinfo/**observiumhttp://postman.memetic.org/cgi-bin/mailman/listinfo/observium >>> >>> >>> >>> ______________________________**_________________ >> observium mailing list >> observium@observium.org >> http://postman.memetic.org/**cgi-bin/mailman/listinfo/**observiumhttp://postman.memetic.org/cgi-bin/mailman/listinfo/observium >> > ______________________________**_________________ > observium mailing list > observium@observium.org > http://postman.memetic.org/**cgi-bin/mailman/listinfo/**observiumhttp://postman.memetic.org/cgi-bin/mailman/listinfo/observium > ______________________________**_________________
observium mailing list observium@observium.org http://postman.memetic.org/**cgi-bin/mailman/listinfo/**observiumhttp://postman.memetic.org/cgi-bin/mailman/listinfo/observium
______________________________**_________________ observium mailing list observium@observium.org http://postman.memetic.org/**cgi-bin/mailman/listinfo/**observiumhttp://postman.memetic.org/cgi-bin/mailman/listinfo/observium
observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
![](https://secure.gravatar.com/avatar/0fa97865a0e1ab36152b6b2299eedb49.jpg?s=120&d=mm&r=g)
It's in html/pages/graphs.inc.php, the godaweful javascript.
You probably just want your pages to use time() and then subtract seconds from it. we set them in definitions.inc.php :
$config['time']['now'] = time(); $config['time']['fourhour'] = $config['time']['now'] - 14400; //time() - (4 * 60 * 60); $config['time']['sixhour'] = $config['time']['now'] - 21600; //time() - (6 * 60 * 60); $config['time']['twelvehour'] = $config['time']['now'] - 43200; //time() - (12 * 60 * 60); $config['time']['day'] = $config['time']['now'] - 86400; //time() - (24 * 60 * 60); $config['time']['twoday'] = $config['time']['now'] - 172800; //time() - (2 * 24 * 60 * 60); $config['time']['week'] = $config['time']['now'] - 604800; //time() - (7 * 24 * 60 * 60); $config['time']['twoweek'] = $config['time']['now'] - 1209600; //time() - (2 * 7 * 24 * 60 * 60); $config['time']['month'] = $config['time']['now'] - 2678400; //time() - (31 * 24 * 60 * 60); $config['time']['twomonth'] = $config['time']['now'] - 5356800; //time() - (2 * 31 * 24 * 60 * 60); $config['time']['threemonth'] = $config['time']['now'] - 8035200; //time() - (3 * 31 * 24 * 60 * 60); $config['time']['sixmonth'] = $config['time']['now'] - 16070400; //time() - (6 * 31 * 24 * 60 * 60); $config['time']['year'] = $config['time']['now'] - 31536000; //time() - (365 * 24 * 60 * 60); $config['time']['twoyear'] = $config['time']['now'] - 63072000; //time() - (2 * 365 * 24 * 60 * 60);
adam.
On 2012-05-23 10:32, Adam Blackington wrote:
thanks Adam.... on an interface graph's page is the calendar tool allowing users to manipulate the graph. In what file(s) is that tool defined? i can't seem to find where it's referenced.
On Wed, May 23, 2012 at 4:52 AM, Adam Armstrong <adama@memetic.org mailto:adama@memetic.org> wrote:
They're Unixtime in seconds. Php time() -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. Adam Blackington <ablackington@lionlink.net <mailto:ablackington@lionlink.net>> wrote: Now that the CIDR fix has been implemented, can anyone tell me how to generate the from and to attributes in the URL? I dont understand how those attributes are calculated? Once I do, I'll be golden! graph.php?to=*1337760941*&id=4&type=port_bits&from=*1337674541*&height=300&width=1075 Thanks, Adam On Tue, May 15, 2012 at 11:19 AM, Adam Armstrong <adama@memetic.org <mailto:adama@memetic.org>> wrote: haha. adama always wins! \o/ On 2012-05-15 13:34, Andy Brown wrote: Ta, Will pull the latest then as I've shifted onto vhost based to get around the other stuff I chatting with you recently about :) Cheers Andy On 15/05/12 12:55, Adam Armstrong wrote: The CIDR option was broken until I fixed it last week in r3169 :D http://fisheye.observium.org/browse/Observium/html/includes/graphs/graph.inc.php?hb=true Those two config options are separate. The CIDR stuff was broken because the code below was exit()ing before it could be tested. :D adam. On 2012-05-15 10:19, Andy Brown wrote: Funnily enough I just tried to use this idea too (I want to export a graph to my external webserver, so am running a small script to grab the graph every hour and upload it to my public server). And I've hit the same problem with grabbing the graph.php directly and not via an authenticated login. I enabled debug and think I've found two problems: Hitting: mylan/graph.php?height=100&width=215&id=1&type=application_heyu_darkstate&debug=true It gives me: Fatal error: Call to undefined function graph_error() in /opt/observium/html/graph.php on line 47 So I assume this is the problem the OP was having but hadn't tried enabling debug, so that should be easy to fix. The second problem I think might just be my interpretation of the config options. In config.php I have put: $config['allow_unauth_graphs'] = 0; $config['allow_unauth_graphs_cidr'] = array("192.168.55.0/24 <http://192.168.55.0/24>"); But I suspect this may be the confusion, should allow_unauth_graphs be set to 1 AND something in the cidr array? Reason I ask is because in graph.php the auth part only has: if (isset($config['allow_unauth_graphs'])&& $config['allow_unauth_graphs']) { $auth = "1"; ## hardcode auth for all with config function } else { if (!$_SESSION['authenticated']) { graph_error("Session not authenticated"); exit; } } So I assume the CIDR thing is new/not fully implemented yet? Cheers :) On 04/05/12 22:47, Tom Laermans wrote: Also, that's indeed as Adam said not a direct access to graph.php as the referer is filled out :-) Tom On 4/05/2012 22:32, Tom Laermans wrote: That's a correct line, but it's HTTP 200, not 500... I didn't see any 500s in the log, but I read it from my cellphone so I could have overlooked :) Tom On Fri, 2012-05-04 at 15:27 -0400, Adam Blackington wrote: Is this not looking right? :: CLIENT.IP - - [03/May/2012:08:32:43 -0400] "GET /graph.php?type=port_upkts&id=60&from=1335961963&to=1336048363&width=100&height=20&legend=no&bg=ffffff HTTP/1.1" 200 1664 "http://OBSERVIUM.IP/device/device=1/tab=port/port=60/" "Mozilla/5.0 (Windows NT 6.1; WOW64) On Fri, May 4, 2012 at 3:20 PM, Adam Armstrong<adama@memetic.org <mailto:adama@memetic.org>> wrote: None of these logs seem relevant. None of them show you directly accessing graph.php Adam _______________________________________________ observium mailing list observium@observium.org <mailto:observium@observium.org> http://postman.memetic.org/cgi-bin/mailman/listinfo/observium _______________________________________________ observium mailing list observium@observium.org <mailto:observium@observium.org> http://postman.memetic.org/cgi-bin/mailman/listinfo/observium _______________________________________________ observium mailing list observium@observium.org <mailto:observium@observium.org> http://postman.memetic.org/cgi-bin/mailman/listinfo/observium _______________________________________________ observium mailing list observium@observium.org <mailto:observium@observium.org> http://postman.memetic.org/cgi-bin/mailman/listinfo/observium _______________________________________________ observium mailing list observium@observium.org <mailto:observium@observium.org> http://postman.memetic.org/cgi-bin/mailman/listinfo/observium _______________________________________________ observium mailing list observium@observium.org <mailto: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
participants (4)
-
Adam Armstrong
-
Adam Blackington
-
Andy Brown
-
Tom Laermans