varnish-dashboard
varnish-dashboard copied to clipboard
Graph doesn't render correctly with multiple servers
I've 5 Varnish servers and the graph shows only the first server in the group. If I look in the other individual servers, they all render correctly.
If I leave it for a while, it'll be like this
Hi,
Could you tell me how did you configure dashboard to include multiple servers ?
I have the following issue
https://github.com/brandonwamboldt/varnish-dashboard/issues/5
Regards, Kevin
I actually don't have the exact problem, although my other issue is that the color label on the graph is distracting and covers up a large portion. I'd like it underneath the graph =).
Although honestly, my 8 cache are round-robin and the graphs (if you look) are all exactly the same, but the display as though VarnishProd8
is handling 100 times more requests.
It looks like mine should all over lay on top of each other almost perfectly, but the render is putting them over and making it larger.
Your servers don't have the same date :-)
Mine?
Not yours :-) The servers of mrteera
Hello,
I try edit the config.js file for multiple servers but without success.
Can you explain me or show me your setup in config.js file for i understand who i can put more than one server?
p.s. i have multiple servers, wetch one with apache server varnish-agent and varnish cache.
could someone post a config with multiple servers as described above -
Hello.
I will try help you.
In root of your folder you have the config.js file, inside it you have something like this:
var config = { servers: [{ "name": "XPTO", "host": "XXX.XXX.XXX.XXX", "port": 6085, "user": "XPTO", "pass": "XPTO" }],
Now, to put another server, put like this:
var config = { servers: [{ "name": "XPTO", "host": "XXX.XXX.XXX.XXX", "port": 6085, "user": "XPTO", "pass": "XPTO" } { "name": "XPTO2", "host": "XXX.XXX.XXX.XXX", "port": 6085, "user": "XPTO2", "pass": "XPTO2" }],
And everything will work.
@rulles - i tried the config that you suggested as follows:
var config = { servers: [ { name: "Varnish01", host: xx.xx.xx.xx, port: 6085, user: "varnish", pass: "xxxxx" } { name: "Varnish02", host: xx.xx.xx.xx, port: 6085, user: "varnish", pass: "xxxxx1" } { name: "Varnish03", host: xx.xx.xx.xx, port: 6085, user: "varnish", pass: "xxxx" } { name: "Varnish04", host: xx.xx.xx.xx, port: 6085, user: "varnish", pass: "xxxx" } ], groups: [], update_freq: 2000, max_points: 100, default_log_fetch: 10000, default_log_display: 100, show_bans_page: false, show_manage_server_page: true, show_vcl_page: true, show_stats_page: true, show_params_page: true, show_logs_page: true, show_restart_varnish_btn: true };
it still does not work - i am still seeing stats for only ONE (local server). Could it be due to version of the agent version?
I tried starting in debug mode to determine what was happening, nothing to point me in the right direction either.
varnish-agent -d -v -H /var/lib/varnish/varnish-dashboard
varnish-agent -V varnish-agent 4.0.1 Copyright (c) 2012-2013 Varnish Software AS
varnishd -V varnishd (varnish-4.0.3 revision b8c4a34) Copyright (c) 2006 Verdens Gang AS Copyright (c) 2006-2014 Varnish Software AS
thanks!
Try put the variavel "servers" between " ".
and i only run the command "varnish-agent -H /var/www/html/Varnish-Agent-Dashboard" without that options "-d" "-v" in the principal, where i want to see the dashboard, in the others, i install the varnish-agent and put him run normally "service varnish-agent start".
Didn't show the servers in servers list on dashboard?
the -d -v are debug and verbose mode, so that i could see what was happening on the CLI -. I did not understand your statement to "Try put the variavel "servers" between " "."
As suggested i tried removing the -H option in the other nodes and include them only on the 'principal' node - no luck
@myoung34 - could you post your config.js to help me?
in the begining of config.js you have:
var config = { servers: [
Try change to:
var config = { "servers": [
Because servers is an array, maybe need to be between " ".
var config = {
servers: [
{ name: 'VarnishDev1', host: '1.1.1.1', port: 6085, user: 'user', pass: 'pass' },
{ name: 'VarnishDev2', host: '2.2.2.2', port: 6085, user: 'user', pass: 'pass' },
{ name: 'VarnishProd1', host: '3.3.3.3', port: 6085, user: 'user', pass: 'pass' },
{ name: 'VarnishProd2', host: '4.4.4.4', port: 6085, user: 'user', pass: 'pass' }
],
groups: [
{
name: 'dev',
servers: [
'VarnishDev1',
'VarnishDev2',
]
},
{
name: 'prod',
servers: [
'VarnishProd1',
'VarnishProd2',
]
}
],
update_freq: 2000,
max_points: 100,
default_log_fetch: 100000,
default_log_display: 100,
show_bans_page: true,
show_manage_server_page: true,
show_vcl_page: true,
show_stats_page: true,
show_params_page: true,
show_logs_page: true,
show_restart_varnish_btn: true
};
@myoung34 - thanks much
here are what my issues were - i did not have quotes around the IP address for the individual nodes and i had stupidly added comments at the top of the beginning with a "#'
Brandon, kudos for the awesome open source project!!
I have installed varnish-dashboard on my host and varnish-agent on virtual machine i have changed my configuration file by doing ifconfig in virtual machine and getting ip adress from it and adding that address to config.js file followed as shown var config = { "servers": [{ name: "Server1", host: "127.0.0.1", port: "6085", user: "varnish_agent_user", pass: "varnish_agent_pass" } { name: "Server2", host: "10.0.2.15", port: "6085", user: "varnish_agent_user", pass: "varnish_agent_pass" } ], groups: [], update_freq: 2000, max_points: 100, default_log_fetch: 10000, default_log_display: 100, show_bans_page: true, show_manage_server_page: true, show_vcl_page: true, show_stats_page: true, show_params_page: true, show_logs_page: true, show_restart_varnish_btn: true }; but while restarting varnish-agent i get to see only 1 server. What might be the problem.