Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
43 lines (31 sloc) 943 Bytes
# vim: ft=sed
# nagios-static/graph.sed
# EugeneKay/scripts
#
# Sed replacements for nagiosgraph showhost.cgi
#
# Remove unused scripting
#/script/d
/menudata/d
/js_disabled/d
/js_version/d
/^<\/script>/d
/\]\]$/d
/\];/d
# Remove graph box
/<div class="controls">/,/<h1>Nagiosgraph/d
# Repoint assets
s/\/nagiosgraph\/nagiosgraph/\/assets\/graph/g
# Remove host link
s/<a href="\/nagios\/cgi-bin\/extinfo.cgi.*">\(.*\)<\/a>/\1/g
# Remove period controls
#s/<button.*<\/button>//g
s/<span class="period_controls.*/<\/span><\/div>/g
# Remove service links
s/<p class="graph_title"><a href=".*">\(.*\)<\/a><\/p>/<p class="graph_title">\1<\/p>/g
# Repoint graphs
s/src=".*host=\(.*\)&service=\([a-zA-Z0-9\-]*\)&db=.*snow-\(.*\)%20-enow-0"/src="graph-\1-\2-\3.png"/g
# Display day's graphs
s/<script type="text\/javascript">.*/<script type="text\/javascript">togglePeriodDisplay('period_data_day')<\/script>/g
# Remove footer
/footer/d
You can’t perform that action at this time.