PHP Network Weathermap 0.8 (now 0.9)
Moderators: Developers, Moderators
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Does it say anything in your Apache error log?imro wrote:I have a problem with editor. When I go to http://myserver/cacti/plugins/weathermap/editor.php only a blank page comes up. It doesn't matter if I use IE or Firefox. The weathermap plugin itself installed with no problems and it generates maps.
Did you copy the editor-config.php-dist to editor-config.php and edit it?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
damn, you're fast
IIS log shows only:
I use IIS. (If you mentioned somewhere that IIS cannot be used I have missed it, sorry)Does it say anything in your Apache error log?
IIS log shows only:
Code: Select all
19:23:52 127.0.0.1 GET /cacti/plugins/weathermap/editor.php 200
Yes I did.Did you copy the editor-config.php-dist to editor-config.php and edit it?
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
I use IIS. (If you mentioned somewhere that IIS cannot be used I have missed it, sorry)imro wrote:damn, you're fast
Does it say anything in your Apache error log?
IIS log shows only:
Code: Select all
19:23:52 127.0.0.1 GET /cacti/plugins/weathermap/editor.php 200
You might want to try
Code: Select all
php editor.php
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- adrianmarsh
- Cacti User
- Posts: 437
- Joined: Wed Aug 17, 2005 8:51 am
- Location: UK
Imro,
If your browser is returning a completely blank page (no errors from IE or anything), then at least the www server is running. The 200 also says its also finding the PHP script. As its not "downloading" the .php file, then the association between php and IIS is there to.
So that leaves two things - either the .php script is broken (unlikely), or the php.exe process isn't running 100%.
Besides the suggestion from Howie (which you should do first), you could also try this: Download Process Explorer (www.sysinternals.com). When you browse to the edior from the client, you should see the dllhost process spawn off php.exe on the Server. Check to see if that happens (be quick, it should only be there a second or so). If your quick enough, you might also be able to look at the environment of the php.exe and verify that its calling editor.php as well.
Also, once the "blank page" has appeared in the browser, goto "View->Source" in your browser. lets see what that says too.
I take it the rest of Cacti works ok ??
If your browser is returning a completely blank page (no errors from IE or anything), then at least the www server is running. The 200 also says its also finding the PHP script. As its not "downloading" the .php file, then the association between php and IIS is there to.
So that leaves two things - either the .php script is broken (unlikely), or the php.exe process isn't running 100%.
Besides the suggestion from Howie (which you should do first), you could also try this: Download Process Explorer (www.sysinternals.com). When you browse to the edior from the client, you should see the dllhost process spawn off php.exe on the Server. Check to see if that happens (be quick, it should only be there a second or so). If your quick enough, you might also be able to look at the environment of the php.exe and verify that its calling editor.php as well.
Also, once the "blank page" has appeared in the browser, goto "View->Source" in your browser. lets see what that says too.
I take it the rest of Cacti works ok ??
when I run php editor.php nothing happens, no HTML code no errors nothing.
But I found the error in syslog (i am learning every minute)
But I found the error in syslog (i am learning every minute)
Code: Select all
php[4764] PHP Parse error: syntax error, unexpected $end in editor.php on line 860
Code: Select all
Also, once the "blank page" has appeared in the browser, goto "View->Source" in your browser. lets see what that says too.
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
OK. If you replace your editor-config.php with the -dist one (unedited), do you still get this? It's possible that something like an unclosed quote or similar would do this. One way you might accidentally get that would be by using backslashes in the pathnames in there - a \' doesn't close a string. Switch to / if you have.imro wrote:when I run php editor.php nothing happens, no HTML code no errors nothing.
But I found the error in syslog (i am learning every minute)
Code: Select all
php[4764] PHP Parse error: syntax error, unexpected $end in editor.php on line 860
Just in case, someone else told me they fixed a similar error by setting "short_open_tag = On" in php.ini. That's the default, according to the PHP manual, but you never know...
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
I think the real answer then is to remove all the short tags (something I thought I had done, actually). I'll add a FAQ entry until the next version appears though!imro wrote:Yep, setting the "short_open_tag = On" in php.ini did it. Editor works like a charm .
I guess you should put it into FAQs on your website.
thank you very much
Just out of curiosity, was your PHP install a 'stock' one? Or had that setting been turned off? It's on by default according to the manual, but I wonder if that's always been the case. I have a vague memory of having to turn it on in ancient (3.x) PHP.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
I downloaded the zip version of php 5.1.2 and used one of the default ini files. This was set to "off" by default.Howie wrote:Just out of curiosity, was your PHP install a 'stock' one? Or had that setting been turned off? It's on by default according to the manual, but I wonder if that's always been the case. I have a vague memory of having to turn it on in ancient (3.x) PHP.
Ok I just went through the two files and php.ini-recommended has it set to "off", where php.ini-dist has this set to "on".
SUGGESTION
I have a big network, and I use different link widths based on available bandwidth. For example: 2px for E3, 3px for 100mbps, 5px for STM1 (155mbps), 7px for gigabit. A legend based on the used values in a map would be nice.
for example:
(2 px line) - 34MB
(3 px line) - 100MB
(5 px line) - 155MB
(7 px line) - 1000MB
I'm sorry, but I suck @ php and it would take too long to make it myself.
Also, I didn't read all the thread (i'll read it today I hope), and I don't know how you draw the links. How about some anti-aliasing?
BTW, tx for plugin. It's great!
I have a big network, and I use different link widths based on available bandwidth. For example: 2px for E3, 3px for 100mbps, 5px for STM1 (155mbps), 7px for gigabit. A legend based on the used values in a map would be nice.
for example:
(2 px line) - 34MB
(3 px line) - 100MB
(5 px line) - 155MB
(7 px line) - 1000MB
I'm sorry, but I suck @ php and it would take too long to make it myself.
Also, I didn't read all the thread (i'll read it today I hope), and I don't know how you draw the links. How about some anti-aliasing?
BTW, tx for plugin. It's great!
[url=http://www.x-graphs.com/]http://www.x-graphs.com[/url] [color=red]X[/color]-[color=blue]graphs[/color] :: All kind of graphs
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Since it's a pretty specific thing, I'd suggest an alternative approach: make an image in an image-processing program, like Paint or Photoshop of the key as you'd like to see it, then place a NODE on your map, with that image as it's icon.Alice wrote: I'm sorry, but I suck @ php and it would take too long to make it myself.
The GD library only has anti-aliasing for wireframe lines (not filled polygons), but it's possible, if I figure out how to do it all myself. It would be nice, but it won't be in the next release.Alice wrote: Also, I didn't read all the thread (i'll read it today I hope), and I don't know how you draw the links. How about some anti-aliasing?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
- adrianmarsh
- Cacti User
- Posts: 437
- Joined: Wed Aug 17, 2005 8:51 am
- Location: UK
Howie,
Along the same lines, these two things I wouldn't mind seeing added at some point:
1) Being able to see the max bandwith of a link in some way, maybe by another description element.
2) An ability to slide the elements of the link (usage/max) up and down. So you could control the placement of the usage text further.
And even longer term I've had these ideas:
3) Time-shifting... One thing you don't get from the maps now is a sense of time (of course you can hover, but not the same). I was thinking maybe an animated gif would work. Say take the last X generated images + current, and sequence them into a mini-movie. (this may also be an option for #1 above to, an animated gif that switches from current usage to max bandwith and back again).
4) Auto-generate maps... something along the lines of an automated script where you select each Node/point from a list, and the script generates the map (either a permenant one, or just temporary for that session). This would probably also need some mechanism for telling it how trunks/paths join together.
Once I've taught myself PHP and perl I might have a bash, but thats a way off yet.
What do you think?
Do you have your own list for whats coming next ?
Along the same lines, these two things I wouldn't mind seeing added at some point:
1) Being able to see the max bandwith of a link in some way, maybe by another description element.
2) An ability to slide the elements of the link (usage/max) up and down. So you could control the placement of the usage text further.
And even longer term I've had these ideas:
3) Time-shifting... One thing you don't get from the maps now is a sense of time (of course you can hover, but not the same). I was thinking maybe an animated gif would work. Say take the last X generated images + current, and sequence them into a mini-movie. (this may also be an option for #1 above to, an animated gif that switches from current usage to max bandwith and back again).
4) Auto-generate maps... something along the lines of an automated script where you select each Node/point from a list, and the script generates the map (either a permenant one, or just temporary for that session). This would probably also need some mechanism for telling it how trunks/paths join together.
Once I've taught myself PHP and perl I might have a bash, but thats a way off yet.
What do you think?
Do you have your own list for whats coming next ?
- Howie
- Cacti Guru User
- Posts: 5508
- Joined: Thu Sep 16, 2004 5:53 am
- Location: United Kingdom
- Contact:
Link descriptions are in the 'maybe' pile for 0.9. I would like to be able to tag both ends of a link with some descriptive text - say it's the interface name on the router, or a telco circuit reference. I haven't started on them yet, but if I find a nice way to do them, they'll be in - I really want them to follow along the edge of the link arrow, if possible.adrianmarsh wrote:Howie,
Along the same lines, these two things I wouldn't mind seeing added at some point:
1) Being able to see the max bandwith of a link in some way, maybe by another description element.
That's a useful one.adrianmarsh wrote: 2) An ability to slide the elements of the link (usage/max) up and down. So you could control the placement of the usage text further.
You can do that roughly, right now. Back on page 4 or 5 of this thread there's a discussion of the necessary shell script and tools for doing it on Unix. If I recall, you're a Windows man, but ImageMagick is available for win32 too. For best results, I'd say it's probably better to use gradient-scales rather than bands. I tried this about a year ago now (before we had gradients), and the result is less exciting than you expect. There's a nice example of animating weathermap that someone did for a huge (5000 user) LAN-party - I'll see if I can find it again. It was in the SomethingAwful forum for a while, but it seems to be in their pay-archive now.adrianmarsh wrote: And even longer term I've had these ideas:
3) Time-shifting... One thing you don't get from the maps now is a sense of time (of course you can hover, but not the same). I was thinking maybe an animated gif would work. Say take the last X generated images + current, and sequence them into a mini-movie. (this may also be an option for #1 above to, an animated gif that switches from current usage to max bandwith and back again).
Someone else (whose name escapes me), has just posted a tool that does something similar, a few pages back.adrianmarsh wrote: 4) Auto-generate maps... something along the lines of an automated script where you select each Node/point from a list, and the script generates the map (either a permenant one, or just temporary for that session). This would probably also need some mechanism for telling it how trunks/paths join together.
Aside from possibly the link comments, I think I've exhausted my personal wishlist with 0.9 - there's a list of those features in this thread too (again, a couple of pages back). Oh - some more general link stuff, like 1-way arrows, to display things other than bandwidth (signal/noise ratio, latency etc). It'd be nice to have something like a SCALE that lets you switch icons for a node, too.adrianmarsh wrote:
Do you have your own list for whats coming next ?
The only other one I'd like is a realtime version, which would not be a cacti plugin, but some kind of standalone app. I sometimes use SolarWinds bandwidth gauge tool, and it'd be nice to have an every-15-seconds weathermap like that. One of the plugin datasources I hope to have in 0.9 is a direct SNMP query, so it would then be possible to have a weathermap without any backend data collection system.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
Who is online
Users browsing this forum: No registered users and 0 guests