@cryptotaxi247 / netdata-1 / commits / 5fef523f1

dashboard support for python.d multijob data collectors

Costa Tsaousis (ktsaou) committed Jul 14, 2016 at 22:46 UTC 5fef523f185c6fba549e4b9b571cd00a5f756e74
1 file changed +113 -63
web/index.html
+113 -63
@@ -1376,11 +1376,11 @@ var menuData = {
1376 title: 'nginx',
1377 info: undefined,
1378 },
1379 -/*
1379 +
1380 'apache': {
1381 title: 'Apache',
1382 info: undefined,
1383 - },*/
1383 + },
1384
1385 'named': {
1386 title: 'named',
@@ -1410,47 +1410,17 @@ var submenuData = {
1410 }
1411 };
1412
1413 +//
1414 +// chartData works on the context of a chart
1415 +// Its purpose is to set:
1416 +//
1417 +// info: the text above the charts
1418 +// heads: the representation of the chart at the top the subsection (second level menu)
1419 +// mainheads: the representation of the chart at the top of the section (first level menu)
1420 +// colors: the dimension colors of the chart (the default colors are appended)
1421 +// height: the ratio of the chart height relative to the default
1422 +//
1423 var chartData = {
1414 - 'mysql.net': {
1415 - info: 'The amount of data sent to mysql clients (<strong>out</strong>) and received from mysql clients (<strong>in</strong>).'
1416 - },
1417 -
1418 - 'mysql.queries': {
1419 - info: 'The number of statements executed by the server.<ul>' +
1420 - '<li><strong>queries</strong> counts the statements executed within stored SQL programs.</li>' +
1421 - '<li><strong>questions</strong> counts the statements sent to the mysql server by mysql clients.</li>' +
1422 - '<li><strong>slow queries</strong> counts the number of statements that took more than <a href="http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_long_query_time" target="_blank">long_query_time</a> seconds to be executed.' +
1423 - ' For more information about slow queries check the mysql <a href="http://dev.mysql.com/doc/refman/5.7/en/slow-query-log.html" target="_blank">slow query log</a>.</li>' +
1424 - '</ul>'
1425 - },
1426 -
1427 - 'mysql.handlers': {
1428 - info: 'Usage of the internal handlers of mysql. This chart provides very good insights of what the mysql server is actually doing.' +
1429 - ' (if the chart is not showing all these dimensions it is because they are zero - set <strong>Which dimensions to show?</strong> to <strong>All</strong> from the dashboard settings, to render even the zero values)<ul>' +
1430 - '<li><strong>commit</strong>, the number of internal <a href="http://dev.mysql.com/doc/refman/5.7/en/commit.html" target="_blank">COMMIT</a> statements.</li>' +
1431 - '<li><strong>delete</strong>, the number of times that rows have been deleted from tables.</li>' +
1432 - '<li><strong>prepare</strong>, a counter for the prepare phase of two-phase commit operations.</li>' +
1433 - '<li><strong>read first</strong>, the number of times the first entry in an index was read. A high value suggests that the server is doing a lot of full index scans; e.g. <strong>SELECT col1 FROM foo</strong>, with col1 indexed.</li>' +
1434 - '<li><strong>read key</strong>, the number of requests to read a row based on a key. If this value is high, it is a good indication that your tables are properly indexed for your queries.</li>' +
1435 - '<li><strong>read next</strong>, the number of requests to read the next row in key order. This value is incremented if you are querying an index column with a range constraint or if you are doing an index scan.</li>' +
1436 - '<li><strong>read prev</strong>, the number of requests to read the previous row in key order. This read method is mainly used to optimize <strong>ORDER BY ... DESC</strong>.</li>' +
1437 - '<li><strong>read rnd</strong>, the number of requests to read a row based on a fixed position. A high value indicates you are doing a lot of queries that require sorting of the result. You probably have a lot of queries that require MySQL to scan entire tables or you have joins that do not use keys properly.</li>' +
1438 - '<li><strong>read rnd next</strong>, the number of requests to read the next row in the data file. This value is high if you are doing a lot of table scans. Generally this suggests that your tables are not properly indexed or that your queries are not written to take advantage of the indexes you have.</li>' +
1439 - '<li><strong>rollback</strong>, the number of requests for a storage engine to perform a rollback operation.</li>' +
1440 - '<li><strong>savepoint</strong>, the number of requests for a storage engine to place a savepoint.</li>' +
1441 - '<li><strong>savepoint rollback</strong>, the number of requests for a storage engine to roll back to a savepoint.</li>' +
1442 - '<li><strong>update</strong>, the number of requests to update a row in a table.</li>' +
1443 - '<li><strong>write</strong>, the number of requests to insert a row in a table.</li>' +
1444 - '</ul>'
1445 - },
1446 -
1447 - 'mysql.table_locks': {
1448 - info: 'MySQL table locks counters: <ul>' +
1449 - '<li><strong>immediate</strong>, the number of times that a request for a table lock could be granted immediately.</li>' +
1450 - '<li><strong>waited</strong>, the number of times that a request for a table lock could not be granted immediately and a wait was needed. If this is high and you have performance problems, you should first optimize your queries, and then either split your table or tables or use replication.</li>' +
1451 - '</ul>'
1452 - },
1453 -
1424 'system.cpu': {
1425 info: 'Total CPU utilization (all cores). 100% here means there is no CPU idle time at all. You can get per core usage at the <a href="#cpu">CPUs</a> section and per application usage at the <a href="#apps">Applications Monitoring</a> section.<br/>Keep an eye on <b>iowait</b> ' + sparkline('system.cpu', 'iowait', '%') + '. If it is constantly high, your disks are a bottleneck and they slow your system down.<br/>Another important metric worth monitoring, is <b>softirq</b> ' + sparkline('system.cpu', 'softirq', '%') + '. A constantly high percentage of softirq may indicate network drivers issues.'
1426 },
@@ -1528,6 +1498,9 @@ var chartData = {
1498 info: 'System swap memory, read from <code>/proc/meminfo</code>.'
1499 },
1500
1501 + // ------------------------------------------------------------------------
1502 + // MEMORY
1503 +
1504 'mem.ksm_savings': {
1505 heads: [
1506 gaugeChart('Saved', '12%', 'savings', '#0099CC')
@@ -1556,6 +1529,9 @@ var chartData = {
1529 colors: NETDATA.colors[3]
1530 },
1531
1532 + // ------------------------------------------------------------------------
1533 + // APPS
1534 +
1535 'apps.cpu': {
1536 height: 2.0
1537 },
@@ -1568,6 +1544,9 @@ var chartData = {
1544 height: 2.0
1545 },
1546
1547 + // ------------------------------------------------------------------------
1548 + // USERS
1549 +
1550 'users.cpu': {
1551 height: 2.0
1552 },
@@ -1580,6 +1559,9 @@ var chartData = {
1559 height: 2.0
1560 },
1561
1562 + // ------------------------------------------------------------------------
1563 + // GROUPS
1564 +
1565 'groups.cpu': {
1566 height: 2.0
1567 },
@@ -1592,6 +1574,9 @@ var chartData = {
1574 height: 2.0
1575 },
1576
1577 + // ------------------------------------------------------------------------
1578 + // NETWORK QoS
1579 +
1580 'tc.qos': {
1581 heads: [
1582 function(id) {
@@ -1603,6 +1588,9 @@ var chartData = {
1588 ]
1589 },
1590
1591 + // ------------------------------------------------------------------------
1592 + // NETWORK INTERFACES
1593 +
1594 'net.net': {
1595 heads: [
1596 gaugeChart('Received', '12%', 'received'),
@@ -1610,6 +1598,25 @@ var chartData = {
1598 ]
1599 },
1600
1601 + // ------------------------------------------------------------------------
1602 + // NETFILTER
1603 +
1604 + 'netfilter.sockets': {
1605 + colors: '#88AA00',
1606 + heads: [
1607 + gaugeChart('Active Connections', '12%', '', '#88AA00')
1608 + ]
1609 + },
1610 +
1611 + 'netfilter.new': {
1612 + heads: [
1613 + gaugeChart('New Connections', '12%', 'new', '#5555AA')
1614 + ]
1615 + },
1616 +
1617 + // ------------------------------------------------------------------------
1618 + // DISKS
1619 +
1620 'disk.util': {
1621 colors: '#FF5588',
1622 heads: [
@@ -1639,19 +1646,6 @@ var chartData = {
1646 info: 'I/O operations currently in progress. This metric is a snapshot - it is not an average over the last interval.'
1647 },
1648
1642 - 'netfilter.sockets': {
1643 - colors: '#88AA00',
1644 - heads: [
1645 - gaugeChart('Active Connections', '12%', '', '#88AA00')
1646 - ]
1647 - },
1648 -
1649 - 'netfilter.new': {
1650 - heads: [
1651 - gaugeChart('New Connections', '12%', 'new', '#5555AA')
1652 - ]
1653 - },
1654 -
1649 'disk.iotime': {
1650 height: 0.5,
1651 info: 'The sum of the duration of all completed I/O operations. This number can exceed the interval if the disk is able to execute I/O operations in parallel.'
@@ -1679,6 +1673,53 @@ var chartData = {
1673 'disk.inodes': {
1674 info: 'inodes (or index nodes) are filesystem objects (e.g. files and directories). On many types of file system implementations, the maximum number of inodes is fixed at filesystem creation, limiting the maximum number of files the filesystem can hold. It is possible for a device to run out of inodes. When this happens, new files cannot be created on the device, even though there may be free space available.'
1675 },
1676 +
1677 + 'mysql.net': {
1678 + info: 'The amount of data sent to mysql clients (<strong>out</strong>) and received from mysql clients (<strong>in</strong>).'
1679 + },
1680 +
1681 + // ------------------------------------------------------------------------
1682 + // MYSQL
1683 +
1684 + 'mysql.queries': {
1685 + info: 'The number of statements executed by the server.<ul>' +
1686 + '<li><strong>queries</strong> counts the statements executed within stored SQL programs.</li>' +
1687 + '<li><strong>questions</strong> counts the statements sent to the mysql server by mysql clients.</li>' +
1688 + '<li><strong>slow queries</strong> counts the number of statements that took more than <a href="http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_long_query_time" target="_blank">long_query_time</a> seconds to be executed.' +
1689 + ' For more information about slow queries check the mysql <a href="http://dev.mysql.com/doc/refman/5.7/en/slow-query-log.html" target="_blank">slow query log</a>.</li>' +
1690 + '</ul>'
1691 + },
1692 +
1693 + 'mysql.handlers': {
1694 + info: 'Usage of the internal handlers of mysql. This chart provides very good insights of what the mysql server is actually doing.' +
1695 + ' (if the chart is not showing all these dimensions it is because they are zero - set <strong>Which dimensions to show?</strong> to <strong>All</strong> from the dashboard settings, to render even the zero values)<ul>' +
1696 + '<li><strong>commit</strong>, the number of internal <a href="http://dev.mysql.com/doc/refman/5.7/en/commit.html" target="_blank">COMMIT</a> statements.</li>' +
1697 + '<li><strong>delete</strong>, the number of times that rows have been deleted from tables.</li>' +
1698 + '<li><strong>prepare</strong>, a counter for the prepare phase of two-phase commit operations.</li>' +
1699 + '<li><strong>read first</strong>, the number of times the first entry in an index was read. A high value suggests that the server is doing a lot of full index scans; e.g. <strong>SELECT col1 FROM foo</strong>, with col1 indexed.</li>' +
1700 + '<li><strong>read key</strong>, the number of requests to read a row based on a key. If this value is high, it is a good indication that your tables are properly indexed for your queries.</li>' +
1701 + '<li><strong>read next</strong>, the number of requests to read the next row in key order. This value is incremented if you are querying an index column with a range constraint or if you are doing an index scan.</li>' +
1702 + '<li><strong>read prev</strong>, the number of requests to read the previous row in key order. This read method is mainly used to optimize <strong>ORDER BY ... DESC</strong>.</li>' +
1703 + '<li><strong>read rnd</strong>, the number of requests to read a row based on a fixed position. A high value indicates you are doing a lot of queries that require sorting of the result. You probably have a lot of queries that require MySQL to scan entire tables or you have joins that do not use keys properly.</li>' +
1704 + '<li><strong>read rnd next</strong>, the number of requests to read the next row in the data file. This value is high if you are doing a lot of table scans. Generally this suggests that your tables are not properly indexed or that your queries are not written to take advantage of the indexes you have.</li>' +
1705 + '<li><strong>rollback</strong>, the number of requests for a storage engine to perform a rollback operation.</li>' +
1706 + '<li><strong>savepoint</strong>, the number of requests for a storage engine to place a savepoint.</li>' +
1707 + '<li><strong>savepoint rollback</strong>, the number of requests for a storage engine to roll back to a savepoint.</li>' +
1708 + '<li><strong>update</strong>, the number of requests to update a row in a table.</li>' +
1709 + '<li><strong>write</strong>, the number of requests to insert a row in a table.</li>' +
1710 + '</ul>'
1711 + },
1712 +
1713 + 'mysql.table_locks': {
1714 + info: 'MySQL table locks counters: <ul>' +
1715 + '<li><strong>immediate</strong>, the number of times that a request for a table lock could be granted immediately.</li>' +
1716 + '<li><strong>waited</strong>, the number of times that a request for a table lock could not be granted immediately and a wait was needed. If this is high and you have performance problems, you should first optimize your queries, and then either split your table or tables or use replication.</li>' +
1717 + '</ul>'
1718 + },
1719 +
1720 + // ------------------------------------------------------------------------
1721 + // APACHE
1722 +
1723 'apache.connections': {
1724 colors: NETDATA.colors[4],
1725 mainheads: [
@@ -1689,7 +1730,7 @@ var chartData = {
1730 'apache.requests': {
1731 colors: NETDATA.colors[0],
1732 mainheads: [
1692 - gaugeChart('Connections', '12%', '', NETDATA.colors[0])
1733 + gaugeChart('Requests', '12%', '', NETDATA.colors[0])
1734 ]
1735 },
1736
@@ -1735,14 +1776,18 @@ var chartData = {
1776 height: 0.5
1777 },
1778
1738 - 'nginx_local.connections': {
1779 +
1780 + // ------------------------------------------------------------------------
1781 + // NGINX
1782 +
1783 + 'nginx.connections': {
1784 colors: NETDATA.colors[4],
1785 mainheads: [
1786 gaugeChart('Connections', '12%', '', NETDATA.colors[4])
1787 ]
1788 },
1789
1745 - 'nginx_local.requests': {
1790 + 'nginx.requests': {
1791 colors: NETDATA.colors[0],
1792 mainheads: [
1793 gaugeChart('Requests', '12%', '', NETDATA.colors[0])
@@ -1820,13 +1865,18 @@ function enrichChartData(chart) {
1865 chart.menu = tmp;
1866 break;
1867
1868 + case 'apache':
1869 + case 'cgroup':
1870 + case 'exim':
1871 case 'mysql':
1824 - case 'redis':
1825 - case 'phpfpm':
1826 - case 'nginx':
1827 -/* case 'apache':*/
1872 case 'named':
1829 - case 'cgroup':
1873 + case 'nginx':
1874 + case 'phpfpm':
1875 + case 'postfix':
1876 + case 'redis':
1877 + case 'squid':
1878 + case 'snmp':
1879 + case 'tomcat':
1880 chart.menu = chart.type;
1881 chart.menu_pattern = tmp;
1882 break;