Is there a way to have the logstash config file be served from a HTTP endpoint?
I want to be able to share the configs from say a S3 bucket endpoint...
And just want to have them in one place.
I thought I saw somewhere I could...but cannot find it in the docs-
Thanks
It is little* unsecure to change your configs from web end-point...
But just for sake of curiosity you can do it.
You cant use nginx + php-fpm and from php you can call bash script which will perform all what you want!)
Also you must set appropriate file modes.
Maybe this approach little bit sophisticated - but it possible to achieve your aim.
PS: Anyway it is bad practice. Better use something like CodeDeploy or Jenkins etc.
Related
I'd like to manage servers/virtual-hosts through an interface programmed in node.js. However, I'm struggling to get/set configurations on Apache.
Executing apachectl -S is the only way I've found to do that, but its response is not friendly to use.
Is there any easier way? Something I do that returns a JSON or Array with the configuration?
I am trying to create a simple text editor that has Operational Transform multi tenant support and while it was reasonably easy to get the editor working and syncing across clients using shareJS, my problem is I would like to sync the shareJS doc's with a Folder structure on the Server side (this will eventually be a git repo)
I am completely new to sharejs and Operational Transforms and found the shareJS documentation a little tough to follow for more complex example.
Any suggestions on How might I approach this problem?
What I have tried to do is to implement a client on the server side that could get the entire doc text on update but (and this is the lack of experience I'm sure) the only way I can think to accomplice is to use the client api to cycle through all documents and write each to a file. But to me this sounds horribly inefficient. Can anyone point me to any resources that might help or offer some advice as to how I could approach this?
This is a bit late thought but you can still call getSnapshop method on the server side and dump that into a file on your file system. If it is not run locally you can create a tiny router with express on your local machine that listen for post request and you post the dumped file into the post request body on your sharejs server and then on your machine dump the post request body to a file, that should work.
Beware of security considerations if you use a auth system on your server.
Probably this isn't the right place to ask this but I don't really know how to google it. Let me try to explain:
Let's suppose that I have 20 IP cameras from different manufacturers, each one with its own configuration page.
Also, I have a machine running a nodejs server that serves a webapp (expressjs).
Is it possible to route each one of the configuration pages through nodejs so that when I want to change some setting I access it like 'nodejsIP:port/cam/camid/' instead of 'cameraip:camport/configpage'?
In the case of that being possible, can I do the same thing with video streams from the cameras?
Yes you can.
The activity you described is called proxy. That is: You -> Proxy -> Your camera.
You can use Node.js as a proxy, there are quite a huge variety of how you could achieve this, as a an example check out the Node-http-proxy module.
Proxying the video streams might be more difficult, but once you proxy configuration pages, you shall have enough knowledge to start with the second part.
I would like to have all HTTP requests made to my production environment be also automatically made against my testing environment. E.g. if anything makes a request to http://production.site.example.com/api/users/12345 then I want the same request to also be made against http://staging.site.example.com/api/users/12345 by some internal entity that sees the first request.
Is there an easy way to set this up in IIS without having to create a custom module or similar? If not, what is the best approach to take when creating such a module, so this does not cause any extra load on the production instance of my app?
Not sure what specifically you're trying to achieve here but you might try with something simple such as implementing redirect in OnUnload event handler (I'm assuming you're using ASP.NET) that will redirect traffic to your test environment.
This way you get everything processed in your production environment and once that is completed you redirect request to test env. Again, not sure what specifically you're trying to do but I'd first try something simple like this using different redirects.
I am working on a cherrpy web service to work with my web app. In this service it needs to be able to access the file system. For example, I want to be able to list all files under a certain directory. I am using os.walk('/public/') but don't seem to get it to work, even though the same code works outside of cherrpy.
Is there a way to make it work so I can use cherrypy to manage files?
What user is the webapp running as, and does it have access to read the folder?
According to the documentation os.walk() will ignore errors from the underlying calls to os.listdirs()
http://docs.python.org/release/2.4.4/lib/os-file-dir.html
You could try setting the onerror argument like
def print_error(error):
print error
os.walk('/public/', print_error)
which might give you a hint as to what's going on.
Also, you could try going directly to os.listdirs() and see if you get any errors from it.