Server Monitoring

Greggers said:
It's working now... no idea what I did/didn't do

I just imagine for the IPCheck Server Monitor at those moments was requesting the user and the password to be able to visualize it, already has passed me also to my, but he is not script, if you enter the real page on jodopulse happens the same, is only of as much in as much (not because that if) :D
 
IPCheck has an internal webserver, and I think it requests user/pass sometimes when it has a numberof people viewing it, I will contact their suport and see if this is a common problem.
 
Not sure if anyone had the same problem, but when I copied the code, there was a number of extra spaces present.

Anyway, I've removed the spaces, and uploaded the revised version, if anyone needs it.

Cheers enterprise, it's a great script!
 

Attachments

  • status.zip
    2.2 KB · Views: 44
Yash said:
ok guys.. I just finished setting up graphing for the windows servers. Graphing for the linux servers will be added in a few days.

WinSD1 Graph
http://jodopulse.com:8090/WinSD1/panel.htm
Win8 Graph
http://jodopulse.com:8090/Win8/panel.htm

to view all graphs:
http://jodopulse.com:8090/
Click on the server name to see all graphs for that server

I have spent 8 hour configuring this. Not fun, let me tell you :)


Now I know someone did some work to get the previous stuff posted on their own site... will there be a way to do the same with the new stuff? I would love to offer this to my clients so they can examine things.

Thanks.
 
gsaunders said:
Now I know someone did some work to get the previous stuff posted on their own site... will there be a way to do the same with the new stuff? I would love to offer this to my clients so they can examine things.

Hi gsaunders,

I am working in that same one now, to be able to offer a compact and usable version :typing:

I am optimizing all the code (ASP-VbScript), for tomorrow I will have it mounted completely and I will hang the application so that all the users can download, is too late, and i go to sleep right now

In any case they can see how the same one is being from the following link: http://enterprisedreams.net/monitor.asp :attn:
 
just to let everyone know, jodopulse.com is still undr development. Soon we will be having all these graphs and status updates integrated into that site so you can easily view whats happening on each server from that website
 
Hi guys,

How it had already mentioned, here it is the mini application, that you can customize it "a piachere", you only will need to change (if you wish), the CSS file and the "ss_top_replace.htm" file, the page default.asp (that she is the one that makes the work) can be rename how it is desired, is not necessary to make no change in the source code of the same one, thus how to either make no modification in the same one, while JodoHost non integrated everything (soon no longer this application will be necessary), this I believe that it will be a little help for all the members (I hope). 8)

Here is the optimized source code:

Code:
<%
'' ASP Monitor Script
'' Powered by EnterpriseDreams Solutions

'' In order to get this thing working you need to do only one thing
'' 1) Absolutally Nothing!!

'' Of course I know most of you will be able to adapt this more to suit your own needs, but at least it gets you started.
'' Please, no remove this
'' Code By Juan C. Barreiro
'' EnterpriseDreams Solutions
'' www.enterprisedreams.net

Function LeoFile(archivo)
	On Error Resume Next
	Set objFSO = CreateObject("Scripting.FileSystemObject")
	Set objText = objFSO.OpenTextFile(Server.MapPath("./ss_scripts/"&archivo&".htm"),1,false,0)
		TemplateGenerado = objText.ReadAll
	Set objText = Nothing
	Set objFSO = Nothing
	LeoFile = TemplateGenerado
End Function

Function ReplaceHTML(CodeHtml,TextDomain,StrPage,varOpenURL)
	CodeHtml = Replace(CodeHtml,"JodoHost",TextDomain)
''	CodeHtml = Replace(CodeHtml,"localhost","cp."&TextDomain)
	CodeHtml = Replace(CodeHtml,"jodoshared.com",TextDomain)
	CodeHtml = Replace(CodeHtml,LeoFile("ss_top"),LeoFile("ss_top_replace"))
	CodeHtml = Replace(CodeHtml,"?","/?\")
	CodeHtml = Replace(CodeHtml,"href=""","href="""&StrPage&"?")
	CodeHtml = Replace(CodeHtml,StrPage&"?#","#")
	CodeHtml = Replace(CodeHtml,"src=""","src="""&StrPage&"?")
	CodeHtml = Replace(CodeHtml,StrPage&"?mailto:","mailto:webmaster@"&TextDomain)
	CodeHtml = Replace(CodeHtml,StrPage&"?http://www.paessler.com/prtg//?\banner=prtg4","http://"&TextDomain)
	CodeHtml = Replace(CodeHtml,StrPage&"?http://www.paessler.com//?\ref=PRTGcopy","http://www.paessler.com/?ref=PRTGcopy")
	CodeHtml = Replace(CodeHtml,StrPage&"?http://www.paessler.com/prtg//?\ref=PRTGcopy","http://www.paessler.com/prtg/?ref=PRTGcopy")
	CodeHtml = Replace(CodeHtml,StrPage&"?/images/logo_ed.gif","/images/logo_ed.gif")
	ReplaceHTML = CodeHtml
End Function

Function ServerStatus(varOpenURL,InicioCadena,FinCadena,TextDomain,StrPage)
	On Error Resume Next
	Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
	objXMLHTTP.Open "GET", "http://jodopulse.com:8090"&Replace(varOpenUrl,"/?\","?"), False
		objXMLHTTP.Send
		CodeHtml = objXMLHTTP.responseText
	Set objXMLHTTP = Nothing
	CodeHtml = ReplaceHTML(RemoveHTML(CodeHtml,InicioCadena,FinCadena),TextDomain,StrPage,varOpenURL)
	If Len(CodeHtml) > 0 Then
		ServerStatus = CodeHtml & VBCrlf
	Else
		ServerStatus = MsgError() & VBCrlf
	End If
End Function

Function RemoveHTML(CodeHtml,InicioCadena,FinCadena)
	While InStr(1, CodeHtml, InicioCadena, vbTextCompare) > 0
		ini = InStr(1, CodeHtml, InicioCadena, vbTextCompare) + Len(InicioCadena)
		fin = InStr(1, CodeHtml, FinCadena, vbTextCompare)
		CodeHtml = Mid(CodeHtml, ini, fin - ini)
	Wend
	RemoveHTML = CodeHtml
End Function

Function MsgError()
	MsgError = MsgError & "<div class=""pie"">" & VBCrlf
	MsgError = MsgError & "<p>Currently, your account credentials are not sufficient to perform this action. </p>" & VBCrlf
	MsgError = MsgError & "<p>" & VBCrlf
	MsgError = MsgError & "<p>To go back to the previous html page, <a href=""javascript:window.history.back();"">click here</a>.</p>" & VBCrlf
	MsgError = MsgError & "<p>" & VBCrlf
	MsgError = MsgError & "<p>If the account credentials you specified are sufficient for this action, an ip lockout may be in effect, " & VBCrlf
	MsgError = MsgError & TextDomain & " Monitor has an automatic lockout mechanism which will prevents unauthorized access from:</p>" & VBCrlf
	MsgError = MsgError & "<p>" & VBCrlf
	MsgError = MsgError & "<ul>" & VBCrlf
	MsgError = MsgError & "<li> specified ip ranges</li>" & VBCrlf
	MsgError = MsgError & "<li> repeated attempts at actions outside of their account permissions</li>" & VBCrlf
	MsgError = MsgError & "</ul>" & VBCrlf
	MsgError = MsgError & "</p>" & VBCrlf
	MsgError = MsgError & "</div>" & VBCrlf
End Function

If Len(request.querystring) > 0 Then varOpenURL = request.querystring Else varOpenURL = "/prtg.htm"

If InStr(1, request.querystring, "graphimg", vbTextCompare) > 0 Then

	On Error Resume Next
	Response.ContentType = "image/png"
	Set HTTPObj = Server.CreateObject("AspHTTP.Conn")
	HTTPObj.Url = "http://jodopulse.com:8090"&Replace(varOpenURL,"/?\","?")
	HTTPObj.GetURL
	Response.BinaryWrite HTTPObj.BinaryData
	Set HTTPObj = Nothing
	Response.End

End If
%>
<html>
<head>
<title><%=Replace(Request.ServerVariables("SERVER_NAME"),"www.","")%> Monitor</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="pragma" content="no-cache">
<link rel="stylesheet" href="ss_scripts/ss_estilo.css" type="text/css">
<script src="ss_scripts/ss_javascript.js" language="javascript" type="text/javascript"></script>
</head>
<body>
<table width="520" border="0" cellspacing="0" cellpadding="0" align="center" style="border: solid 1px #000000;">
<tr>
    <td valign="top"><%=ServerStatus(varOpenUrl,"<BODY>","</BODY>",Replace(Request.ServerVariables("SERVER_NAME"),"www.",""),Request.ServerVariables("SCRIPT_NAME"))%></td>
</tr>
</table>
</body>
</html>
 

Attachments

  • monitor.zip
    8.4 KB · Views: 37
Got an interesting error message. Is it me or is it something wrong?

Currently, your account credentials are not sufficient to perform this action.

To go back to the previous html page, click here.

If the account credentials you specified are sufficient for this action, an ip lockout may be in effect, Monitor has an automatic lockout mechanism which will prevents unauthorized access from:

* specified ip ranges
* repeated attempts at actions outside of their account permissions
 
The XML pagescrapes could have caused the internal http server to hit a max, I will see if there is anything we can do there.
 
Back
Top