Script Request
Looking for a script which will check connectivity of any or all of our company URL's first thing in the morning to make sure none or our sites are down. Any suggestions ? Thank You -- https://mail.python.org/mailman/listinfo/python-list
Re: Script Request
On Wed, Dec 11, 2013 at 6:53 AM, Jeff James j...@jeffljames.com wrote: Looking for a script which will check connectivity of any or all of our company URL's first thing in the morning to make sure none or our sites are down. Any suggestions ? Thank You import urllib sites = [http://www.amazon.com/;, http://nowhere.com;] for site in sites: try: urllib.urlopen(site) print site + is up except Exception, e: print site + is down -- https://mail.python.org/mailman/listinfo/python-list
Re: Script Request
On Wed, 11 Dec 2013 04:53:41 -0700, Jeff James wrote: Looking for a script which will check connectivity of any or all of our company URL's first thing in the morning to make sure none or our sites are down. Any suggestions ? Don't reinvent the wheel, use a tool already designed for this task, such as Nagios. -- Steven -- https://mail.python.org/mailman/listinfo/python-list
Re: Script Request
Hi, On Wed, 11 Dec 2013 04:53:41 -0700 Jeff James wrote: Looking for a script which will check connectivity of any or all of our company URL's first thing in the morning to make sure none or our sites are down. Any suggestions ? Thank You This really is not a suggestion because the software is not usable for production use - there are missing too many features. But I am currently developing a Nagios style monitoring solution using Python. The software is called Linspector and it has an own homepage: http://linspector.org Linspector currrently only supports some TCP port probes and checking for a string in some content fetched via HTTP. We are not developing more servicve checks at the moment because we at first want to build the core of the application to make sure we don't have to refactor to much code all the time. In the future Linspector will be a complete monitoring solution supporting many protocols like SNMP, devices like sensors etc. Linspector differs to all other monitoring solutions that it only does monitoring, alerting and the storage of results in a database like MongoDB. It really does not build graphs, statistics, SLA reports etc. because we think this is not the job of a monitoring software which you really should rely on and which not should waste CPU time for such stuff. All data could be accessed from web applications, desktop applications etc. for later usage. Another big difference is, that we do not provide a graphical interface in Linspector. Linspector provides a Shell style interface for managing an instance. In this Shell, called Lish, you will be able to enable/disable jobs, get job lists, get a jobs state etc. Another interface to Linspector is a JSON-RPC interface so you can easy write your own management software for Linspector. Be sure, Linspector is in a very early state of development but development is going on every day and it is my main project... I love it so i will not stop developing it. We are planning to finish the core features until January/February 2014 and will then start building a lot of service checks for all the everyday monitoring tasks. Even the Shell interface is only partly usable at the moment so this will also be done until early 2014. If you have any questions about this software feel free to conatct me directly via mail. Regards, Johannes -- https://mail.python.org/mailman/listinfo/python-list
Re: Script Request...
some one wrote: Thanks Diez, I found some docs and examples on urllib2. Now how do i search the string I get from urllib2, lets say I put it in myURL, How do I search for only Numbers and .'s in the #.#.#.# pattern. That is all I am interested in with all the data retrieved. Just the IP Address from amongst a bunch of data that I have no use of currently. I would I write a pattern matching function to extract only the IP address from myURL? Pattern-matching can be done using regular expressions, they are available in the module re. Diez -- http://mail.python.org/mailman/listinfo/python-list
Re: Script Request...
On Mar 19, 10:29 pm, some one [EMAIL PROTECTED] wrote: Thanks Diez, I found some docs and examples on urllib2. Now how do i search the string I get from urllib2, lets say I put it in myURL, How do I search for only Numbers and .'s in the #.#.#.# pattern. That is all I am interested in with all the data retrieved. Just the IP Address from amongst a bunch of data that I have no use of currently. I would I write a pattern matching function to extract only the IP address from myURL? See the subsection titled 'Matching An IP Address', here: http://www.oreilly.com/catalog/regex/chapter/ch04.html Gerard Show us your concrete efforts, and we will suggest improvements. Diez -- http://mail.python.org/mailman/listinfo/python-list
Script Request...
Hi all, I am not to familiar with python yet and I am wondering if someone can write a script that will monitor my DSL modems IP address and notify when it changes, its a 2Wire Advanced DSL Modem. I need to know when it changes because I am trying to run my own inhouse server and have to update my domain records through verio.com. The script would need to read the text of a web page( on my modem the address is http://192.168.0.1/xslt?PAGE=B01THISPAGE=NEXTPAGE=B01 ) and search for a string containing the IP address. Can anyone help? thanks, I'll keep monitoring this thread. -- http://mail.python.org/mailman/listinfo/python-list
Re: Script Request...
some one wrote: Hi all, I am not to familiar with python yet and I am wondering if someone can write a script that will monitor my DSL modems IP address and notify when it changes, its a 2Wire Advanced DSL Modem. I need to know when it changes because I am trying to run my own inhouse server and have to update my domain records through verio.com. The script would need to read the text of a web page( on my modem the address is http://192.168.0.1/xslt?PAGE=B01THISPAGE=NEXTPAGE=B01 ) and search for a string containing the IP address. Can anyone help? thanks, I'll keep monitoring this thread. Try urllib2 to fetch the data, use either string-search, regular expressions or even BeautifulSoup to extract the data. Use a cron-job to do that on a regular base or use module time.sleep() together with an endless loop to monitor that location periodically. Show us your concrete efforts, and we will suggest improvements. Diez -- http://mail.python.org/mailman/listinfo/python-list
Re: Script Request...
Thanks Diez, I found some docs and examples on urllib2. Now how do i search the string I get from urllib2, lets say I put it in myURL, How do I search for only Numbers and .'s in the #.#.#.# pattern. That is all I am interested in with all the data retrieved. Just the IP Address from amongst a bunch of data that I have no use of currently. I would I write a pattern matching function to extract only the IP address from myURL? In article [EMAIL PROTECTED], [EMAIL PROTECTED] says... some one wrote: Hi all, I am not to familiar with python yet and I am wondering if someone can write a script that will monitor my DSL modems IP address and notify when it changes, its a 2Wire Advanced DSL Modem. I need to know when it changes because I am trying to run my own inhouse server and have to update my domain records through verio.com. The script would need to read the text of a web page( on my modem the address is http://192.168.0.1/xslt?PAGE=B01THISPAGE=NEXTPAGE=B01 ) and search for a string containing the IP address. Can anyone help? thanks, I'll keep monitoring this thread. Try urllib2 to fetch the data, use either string-search, regular expressions or even BeautifulSoup to extract the data. Use a cron-job to do that on a regular base or use module time.sleep() together with an endless loop to monitor that location periodically. Show us your concrete efforts, and we will suggest improvements. Diez -- http://mail.python.org/mailman/listinfo/python-list