Jump to content

Recommended Posts

Posted

Hi Tim,

This is ours that we modified from @zag.

Taken off the first column of IP's just to show on here.

We only use it in IT office so its not publicly available on intranet.

Happy to send you the code if it helps

monitor.JPG

Posted (edited)
Hi Tim,

This is ours that we modified from @zag.

Taken off the first column of IP's just to show on here.

We only use it in IT office so its not publicly available on intranet.

Happy to send you the code if it helps

[ATTACH=CONFIG]50345[/ATTACH]

 

Hi Karl

 

I think i cracked it yesterday - well last night / this morning after not being able to sleep - just need to work out to get the script to monitor the ports.

 

This is what i'm using to monitor ports https://mfscripts.com/free-website-scripts/site-status-script.html so if someone knows how to bring both together, i'd be most grateful.

Edited by timbo343
Posted (edited)
Hi Karl

 

I think i cracked it yesterday - well last night / this morning after not being able to sleep - just need to work out to get the script to monitor the ports.

 

This is what i'm using to monitor ports https://mfscripts.com/free-website-scripts/site-status-script.html so if someone knows how to bring both together, i'd be most grateful.

 

You could assume that when no port is specified (ie. $port[0] is empty) then ping, otherwise use fsockopen on the specified port.

 

 

I'm going to rewrite this soon, as the code is really messy. I'll take a look then but its designed to be as simple as possible really.

 

 

In line with the above suggestion, you could create an array for each target with host, desc, port...

 

 

$systems[] = array('host' => 'SRV001', 'desc' => 'SQL Server', 'port' => '1433');

 

 

 

Also, if you're monitoring websites it's not enough to just do a ping / check the port. The indicator of a website being down is by using HTTP status codes so perhaps do this when port 80 or 8080 is specified.

Edited by Matzo
Posted
I'm keen to get this working with server name and the ports. Would i just add the line into the PHP file and it should work or is there extra variables that need to be added before the command can work.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...