Monthly bandwidth on per app basis
It would be great to see what app consumes most of the bandwidth.
-
Charles Almeida commented
Yes, it needs to exist for better monitoring.
-
Paul Davidson commented
Monthly totals per app for bandwidth are necessary for better management of individual apps server needs. !2 months of data would be excellent to see trends in the usage of the app.
-
David Gaillard commented
Ideally, that CW store the total amount of bandwidth used per app for the last 12 months, by setting up a cron job that run monthly
-
Fostira commented
Can we get it now that the control panel is getting updated?
-
Anonymous commented
Yes, please, this is so important!!!
-
Davo commented
Please give us app bandwidth stats :-)
-
Sourabh Raikwar commented
add new features to see bandwidth usage of a specific website
-
Anonymous commented
It would be nice to know how much bandwidth each application is using.
-
Joel Crump commented
Part of what makes cloudways great is the ease of server management, this would be amplified if we could see which app is using % of bandwidth in the servers monitoring view so we can identify bandwidth heavy apps and diagnose.
-
Russell commented
I wrote a Python script that grabs and charts this info for me. At the center of the script is the following.
grep = 'grep -I' # -I ignores .gz and other binary files # use grep = 'zgrep' for older dates to search through the gzipped files
daystr = day.strftime('%d/%b/%Y')
app_dir = str(site.app_dir).replace('~','$HOME') # It doesn't expand ~ by itself for whatever reason.
search_command = (
'| cut -d[ -f2 ' # split each line into fields, using [ as the deliminator, and grab the second field
'| awk '
'-F: ' # The -F option speficies a separator. We want to get the hour -- the second item of the timestamp -- and so we use a colon as a delimiter
'\'{ split($4, A, " "); ' # Create the array A that will contain the results of splitting $4 (everything after the timestamp) with a space character
'h[$2]+=A[7]; } ' # Create or add to the array h. The key is the hour and the value are the bytes (7th column in our splitted array)
'END ' # What comes next will be processed after running through all of the data
'{ for (i in h) print h[i], i":00"}\' ' # for each hour output the hour followed by how many bytes where recorded for that time
)ssh.check_output(
f'cd "{app_dir}/logs"; '
'LC_ALL=C; ' # Speed things up by using ASCII instead of UTF-8
f'{grep} "{daystr}" *.access.log* ' # search for lines of text containing our date
# hint: for debugging you can use the tail command for quicker searches
+ search_command
) -
chris commented
When?
-
Soso Janashvili commented
A Must! +1 for it
-
Clark Stiles commented
yes please.