graph_xport.php Issue

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Moderators, Developers

Author
Message
EssamElden
Posts: 10
Joined: Sun Aug 25, 2019 4:56 am

Re: graph_xport.php Issue

#16 Post by EssamElden » Mon Sep 23, 2019 8:10 am

netniV wrote:
Sun Sep 22, 2019 11:17 am
Traveling right now but the README.md should have all the information you need. Just taken the token auth parameters onto the get request and it should be able to do it all . If you use the save-cookies option you can save the authentication across multiple wget calls.
README isn't clear but used below commends but didn't work . I hope you give examples how to download file by wget with privte key or cookies


wget -qO --keep-session-cookies --save-cookies cookies.txt http://10.74.155.5/cacti

[[email protected] ~]# wget -qO- --load-cookies cookies.txt http://10.74.155.5/cacti/graph_xport.ph ... 1568796300
[5] 29918
[6] 29919
[7] 29920
[8] 29921
[1] Exit 4 wget -qO --load-cookies cookies.txt http://10.74.155.5/cacti/graph_xport.ph ... h_id=15824
[3] Done view_type=tree
[4] Done graph_start=1568709900
[6] Done rra_id=0
[7]- Done view_type=tree
[[email protected] ~]# <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv='X-UA-Compatible' content='IE=Edge,chrome=1'>
<meta content='width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0' name='viewport'>
<meta name='apple-mobile-web-app-capable' content='yes'>
<meta name='mobile-web-app-capable' content='yes'>
<meta name='robots' content='noindex,nofollow'>
<title>Login to Cacti</title>
<meta http-equiv='Content-Type' content='text/html;charset=utf-8'>
<script type='text/javascript'>
var theme='modern';
var searchFilter='Enter a search term';
var searchRFilter='Enter a regular expression';
var noFileSelected='No file selected';
var timeGraphView='Time Graph View';
var filterSettingsSaved='Filter Settings Saved';
var spikeKillResuls='SpikeKill Results';
var utilityView='Utility View';
var realtimeClickOn='Click to view just this Graph in Realtime';
var realtimeClickOff='Click again to take this Graph out of Realtime';
var treeView='Tree View';
var listView='List View';
var previewView='Preview View';
var cactiHome='Cacti Home';
var cactiProjectPage='Cacti Project Page';
var cactiCommunityForum='User Community';
var cactiDocumentation='Documentation';
var reportABug='Report a bug';
var aboutCacti='About Cacti';
var spikeKillResults='SpikeKill Results';
var showHideFilter='Click to Show/Hide Filter';
var clearFilterTitle='Clear Current Filter';
var clipboard='Clipboard';
var clipboardID='Clipboard ID';
var clipboardNotAvailable='Copy operation is unavailable at this time';
var clipboardCopyFailed='Failed to find data to copy!';
var clipboardUpdated='Clipboard has been updated';
var clipboardNotUpdated='Sorry, your clipboard could not be updated at this time';
var defaultSNMPSecurityLevel='authPriv';
var defaultSNMPAuthProtocol='MD5';
var defaultSNMPPrivProtocol='DES';
var passwordPass='Passphrase length meets 8 character minimum';
var passwordTooShort='Passphrase too short';
var passwordMatchTooShort='Passphrase matches but too short';
var passwordNotMatchTooShort='Passphrase too short and not matching';
var passwordMatch='Passphrases match';
var passwordNotMatch='Passphrases do not match';
var errorOnPage='Sorry, we could not process your last action.';
var errorNumberPrefix='Error:';
var errorReasonPrefix='Reason:';
var errorReasonTitle='Action failed';
var errorReasonUnexpected='The response to the last action was unexpected.';
var mixedReasonTitle='Some Actions failed';
var mixedOnPage='Note, we could not process all your actions. Details are below.';
var sessionMessageTitle='Operation successful';
var sessionMessageSave='The Operation was successful. Details are below.';
var sessionMessageOk='Ok';
var sessionMessagePause='Pause';
var sessionMessageContinue='Continue';
var sessionMessageCancel='Cancel';
var zoom_i18n_zoom_in='Zoom In';
var zoom_i18n_zoom_out='Zoom Out';
var zoom_i18n_zoom_out_factor='Zoom Out Factor';
var zoom_i18n_timestamps='Timestamps';
var zoom_i18n_zoom_2='2x';
var zoom_i18n_zoom_4='4x';
var zoom_i18n_zoom_8='8x';
var zoom_i18n_zoom_16='16x';
var zoom_i18n_zoom_32='32x';
var zoom_i18n_zoom_out_positioning='Zoom Out Positioning';
var zoom_i18n_mode='Zoom Mode';
var zoom_i18n_graph='Graph';
var zoom_i18n_quick='Quick';
var zoom_i18n_advanced='Advanced';
var zoom_i18n_newTab='Open in new tab';
var zoom_i18n_save_graph='Save graph';
var zoom_i18n_copy_graph='Copy graph';
var zoom_i18n_copy_graph_link='Copy graph link';
var zoom_i18n_on='Always On';
var zoom_i18n_auto='Auto';
var zoom_i18n_off='Always Off';
var zoom_i18n_begin='Begin with';
var zoom_i18n_center='Center';
var zoom_i18n_end='End with';
var zoom_i18n_disabled='Disabled';
var zoom_i18n_close='Close';
var zoom_i18n_settings='Settings';
var zoom_i18n_3rd_button='3rd Mouse Button';
</script>
<link href='/cacti/include/themes/modern/images/favicon.ico' rel='shortcut icon'>
<link href='/cacti/include/themes/modern/images/cacti_logo.gif' rel='icon' sizes='96x96'>
<link href='/cacti/include/themes/modern/jquery.zoom.css?aabc6f45db68bd321ca27338899ef75d' type='text/css' rel='stylesheet'>
<link href='/cacti/include/themes/modern/jquery-ui.css?a7406d654968e3c1531207059a9d15d2' type='text/css' rel='stylesheet'>
<link href='/cacti/include/themes/modern/default/style.css?b16e44c8ea2180ea769a22921bc369ad' type='text/css' rel='stylesheet'>
<link href='/cacti/include/themes/modern/jquery.multiselect.css?e8d1b3ce433249ef1f2f15343caa74fb' type='text/css' rel='stylesheet'>
<link href='/cacti/include/themes/modern/jquery.timepicker.css?431ab7d4ef48afd9c39a647c5c990b0a' type='text/css' rel='stylesheet'>
<link href='/cacti/include/themes/modern/jquery.colorpicker.css?24366e47db1fb3b58658a53d9a445214' type='text/css' rel='stylesheet'>
<link href='/cacti/include/themes/modern/c3.css?4aef467349628c8e407ecc205eac5375' type='text/css' rel='stylesheet'>
<link href='/cacti/include/themes/modern/pace.css?813d842ea49d68287a59d7f49575aaa6' type='text/css' rel='stylesheet'>
<link href='/cacti/include/fa/css/fontawesome.css?c33e55a3e79984d24f3309545701cb1b' type='text/css' rel='stylesheet'>
<link href='/cacti/include/vendor/flag-icon-css/css/flag-icon.css?216e807dd0b784846799cb18051f250d' type='text/css' rel='stylesheet'>
<link href='/cacti/include/themes/modern/main.css?f268fc58192e437f36db1c4b92e2e7d2' type='text/css' rel='stylesheet'>
<script type='text/javascript' src='/cacti/include/js/screenfull.js?60a2ad1d452950179fa4d2c5d1b5dee4'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.js?2f0d15c70b7e652d5d61ed4032eb44af'></script>
<script type='text/javascript' src='/cacti/include/js/jquery-ui.js?f1f075fe32aca8216e55c5d00106fba7'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.ui.touch.punch.js?4195aad6f616651c00557e84c6721646'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.cookie.js?0b804d4f90de70b032a9986b22165b75'></script>
<script type='text/javascript' src='/cacti/include/js/js.storage.js?dbcd4e6ad90c47adfa9dd509ceb55eb9'></script>
<script type='text/javascript' src='/cacti/include/js/jstree.js?9c5fd7680b6c205ef0d84938a714863c'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.hotkeys.js?fbf82bcab286e9fc5cdf863eb067230f'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.tablednd.js?a33b14ebf8ce2abf7911e62cbc19e0c5'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.zoom.js?ebe407101d8d61e617730e487c2739f2'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.multiselect.js?50c27f2739136f7628a37ea9490f84b8'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.multiselect.filter.js?eb99fd8e2b0736c839c1b0a736af21c0'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.timepicker.js?f29132ab24085f909242175ad11cfcbc'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.colorpicker.js?3b7032780b24b9b48050e5d245a36260'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.tablesorter.js?8d331985e11cfc65649a915073cb30ed'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.tablesorter.widgets.js?3cc0d7b3426e1db1e4a099db18b17e3c'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.tablesorter.pager.js?8ca32d30195c98492cd028f582f07c8c'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.metadata.js?bdd7532ce75cce796a5451bd4322d61f'></script>
<script type='text/javascript' src='/cacti/include/js/jquery.sparkline.js?c7638b825bc7deb1cf58c990825d35b2'></script>
<script type='text/javascript' src='/cacti/include/js/Chart.js?ae4cd3db34d0ea7ea1a9596d5d4120e6'></script>
<script type='text/javascript' src='/cacti/include/js/dygraph-combined.js?b5b448f71f8c3eb4a39506299bd81b0c'></script>
<script type='text/javascript' src='/cacti/include/js/d3.js?deffc46f8897f03577db78366eeb8c42'></script>
<script type='text/javascript' src='/cacti/include/js/c3.js?7d5f7e1808389a5ef7184d395cff08e8'></script>
<script type='text/javascript' src='/cacti/include/js/pace.js?30fbf6c62d78d3367fa50bd51913200c'></script>
<script type='text/javascript' src='/cacti/include/realtime.js?dc16bb28852bb26232ab9d269210abdd'></script>
<script type='text/javascript' src='/cacti/include/layout.js?fbb280abb7bd39a609438a67f991da29'></script>
<script type='text/javascript' src='/cacti/include/themes/modern/main.js?aa10c919b68dbbd87eb1a0a62212db43'></script>
<link href='/cacti/plugins/thold/themes/modern/main.css' type='text/css' rel='stylesheet'>
<script type='text/javascript'>
$(function() {
$(document).ajaxComplete(function() {
$('.tholdVRule').unbind().click(function(event) {
event.preventDefault();

href = $(this).attr('href');
href += '&header=false';

$.get(href, function(data) {
$('#main').empty().hide();
$('div[class^="ui-"]').remove();
$('#main').html(data);
applySkin();
});
});
});
});
</script>
<script type="text/javascript">if (top != self) {top.location.href = self.location.href;}</script><script type="text/javascript">var csrfMagicToken = "sid:3ae6449930a13b9447f1a81c188538c022ee8b20,1569243874";var csrfMagicName = "__csrf_magic";</script><script src="/cacti/include/vendor/csrf/csrf-magic.js" type="text/javascript"></script></head>
<body class='loginBody'>
<div class='loginLeft'></div>
<div class='loginCenter'>
<div class='loginArea'>
<div class='cactiLoginLogo'></div>
<legend>User Login</legend>
<form name='login' method='post' action='graph_xport.php'><input type='hidden' name='__csrf_magic' value="sid:3ae6449930a13b9447f1a81c188538c022ee8b20,1569243874" />
<input type='hidden' name='action' value='login'>
<div class='loginTitle'>
<p>Enter your Username and Password below</p>
</div>
<div class='cactiLogin'>
<table class='cactiLoginTable'>
<tr>
<td>
<label for='login_username'>Username</label>
</td>
<td>
<input type='text' class='ui-state-default ui-corner-all' id='login_username' name='login_username' value='' placeholder='Username'>
</td>
</tr>
<tr>
<td>
<label for='login_password'>Password</label>
</td>
<td>
<input type='password' class='ui-state-default ui-corner-all' id='login_password' name='login_password' placeholder='********'>
</td>
</tr>
<tr>
<td colspan='2'>
<input style='vertical-align:-3px;' type='checkbox' id='remember_me' name='remember_me' >
<label for='remember_me'>Keep me signed in</label>
</td>
</tr>
<tr>
<td cospan='2'>
<input type='submit' class='ui-button ui-corner-all ui-widget' value='Login'>
</td>
</tr>
</table>
</div>
</form>
<div class='loginErrors'>
</div>
</div>
<div class='versionInfo'>Version 1.2.3 | (c) 2004-2019 - The Cacti Group</div>
</div>
<div class='loginRight'></div>
<script type='text/javascript'>
$(function() {
$('body').css('height', $(window).height());
$('.loginLeft').css('width',parseInt($(window).width()*0.33)+'px');
$('.loginRight').css('width',parseInt($(window).width()*0.33)+'px');
$('#login_username').focus();
});
</script>
<script type='text/javascript'>
var cactiVersion='1.2.3';
var cactiServerOS='unix';
var theme='modern';
var refreshIsLogout=true;
var refreshPage='/cacti/logout.php?action=timeout';
var refreshMSeconds=1440000;
var urlPath='/cacti/';
var previousPage='';
var sessionMessage=[];
var csrfMagicToken='sid:3ae6449930a13b9447f1a81c188538c022ee8b20,1569243874';
</script>
<script type="text/javascript">CsrfMagic.end();</script></body>
</html>

Post Reply