In my Tigase component i have override getStatistics method to add the statistics ( i.e. no of spam messages, all process packets etc) in the list. How can i access that list outside that method or component.In this Component implementation - Lesson 5 - Statistics its written that
"All the server statistics are exposed and are accessible via XMPP with ad-hoc commands, HTTP, JMX and some selected statistics are also available via SNMP" so is there any command which let me to get all the statistics.
Thanks
There are 2 ways to gather Tigase statistics:
Admin Ad-hoc command via XMPP. You have to connect from through an admin account to the Tigase server, browse service discovery and then execute command on the Statistics provider component. I recumbent Psi client for this.
Another way is to connect via JMX protocol using JConsole or similar application. Then you can collect all the Java statistics plus, the Tigase provides own bean to browse it's statistics or just download them all (it might be 1,000 or more metrics from the server).
Also through JMX but might be more convenient using our utility class: JavaJMXProxyOpt. You can write a very simple command line tool which collects Tigase statistics and dumps it to a text file. The class offers a few options for a periodic statistics download, etc....
Related
I am currently looking for Ejabberd monitoring tool. There are certain ejabberd modules like grafite, statsfxd and statsd but i get error when i enable them. Alos the ejabberd official site states that the server is configurable with Nagios monitoring but i could not find any nagios plugin for monitoring ejabberd. Can anyone guide me on this.
There aren't any out-of-the-box solutions for this. You'll have to create your own.
One of the simpler solutions is to write a Bash script to use ejabberdctl to export server statistics to a web-accessible file, then use Prometheus's blackbox-exporter to scrape that file and get its metrics into Prometheus.
I am currently looking at possible development models for a device that will be in a clients home. I need the device to run a local copy of Meteor while also being able to get and insert information from a central server in a secure/reactive way.
All sensitive information has not been included in this image
I am required to make a local server as I need to run shell commands on the device. While the device could make HTTP webhook calls, it would be slow due to packet travel time and does not meet requirements.
I know that the local server could connect to the Central Server mongodb which would be ideal, however as this local server is physically located in a clients house, this means that the mongodb password would be exposed (big security problem). Also I would be unable to control what information is sent to the local server. I was unable to find a way to subscribe to an external server, which would be a great solution.
Another way could be that the local server simply use HTTP requests, however another requirement is that Audit requests appear almost as soon as they are issued which is ideal for a reactive mongodb item. A heartbeat wouldn't really fit due to the data/processing overheads and slowness.
The summary the question is: How to make a device to run a local copy of Meteor while also being able to get and insert information from a central server in a secure/reactive way.
Well in the end, I found that you can use cross-server and even CORS connections with https://docs.meteor.com/api/connections.html
So now any aspiring developer can use the DDP framework.
I want to create a Meteor application that interacts with the user and at the same time receives market data from multiple TCP sockets. I intend to channel the market data (from various TCP sockets) into one collection.
I had been looking around but i do not see a net.createServer method for Meteor. Can anyone give any pointers for me to start?
Thanks in advance!
Meteor has a packaging system that allows you to use node modules. So I would look at node modules to find the server functionality you want to add. The node core module http might be a good start.
You can also just search the NPM registry for a module with functionality that fits your needs better. Then just include it in you Meteor app through the packaging system. I have included the NPM pubsubhubbub in an rss aggregator that listens for pings and fills client collections so the package I used might be an example to follow.
Listening for data arriving on other ports or other domains will not work for a deployment on meteor.com so I think what you are describing will also require you to host the app.
I want to create a XMPP server on my network and then send message to it with python so that this server can restart the target computer on the network , now how can i set up this server and how can i do the rest of the process?
tnx
I am not sure in what context you are trying to do this, but XMPP has been used in context outside of usual chat and instant messengers (e.g. load balancers, rpc, ...).
There can be several ways of doing this. One way I can think right now is by using Jabber RPC xep-0009 which says:
This specification defines an XMPP protocol extension for
transporting XML-RPC encoded requests and responses between two XMPP entities.
The protocol supports all syntax and semantics of XML-RPC except that
it uses XMPP instead of HTTP as the underlying transport.
Workflow wise here is how you can make this work:
You will need a jabber server which is up and running say on host-A
You will need to configure a startup service on other hosts in the network (say on host-B, host-C, host-D). This startup service is nothing but a xmpp client daemon which will start in the background whenever host is started.
This xmpp client configured as startup service are special in the sense that they will accept incoming rpc calls (support for XEP-0009) and execute received commands on the host.
Received RPC commands can be synonymous to shutdown, kill -9 xxxx depending upon your specific needs.
Finally, xmpp client on host-C can send one or more commands wrapped inside an stanza to xmpp client running on host-B.
You can use one of the existing python xmpp client library and simply extend their working examples for your use case. You will also need to check details on how to configure startup service depending upon your Operating System (e.g. update-rc.d for ubuntu or sc.exe for windows)
It seems that both service and server refer to some web based application. But is there any precise definition of the two terms?
A server offers one or more services. Server is also a more technical term, whereas service is more a term off the problem domain.
You also need to distinguish between:
Server as hardware (see post from Dan D)
Server as software (eg. Apache HTTP server)
You can find more elaborate definiton on Wikipedia:
Service
Server
This is regardless of client-server or P2P models.
A server provides services to one or more clients, and a server(hardware) is a computer. A server(hardware) can be anything from a home computer to a big server-rack with a lot of processor power.
From the view of a computer, a server(software) is just a set of services which is available to clients on the network.
Some well known services are web-server, mail-server. ftp-server. notice they are called xxx-server because such programs consist of a client and server part. The postfix is mainly to distinguish whether we are talking about the client or the server.
So at what moment do we call something a server? We do it when a computer shares some service/content on the network, which is accessible by clients. In other words, when we make a server as defined for software.
Regarding the P2P model: every one is both a client and a server, hence called servent. The above apply to the server part of a P2P network, just remember that it also can be a client.
Futher reading:
Client-Server model
P2P
a server is a piece of hardware or on a virtual machine
a service is a process that provides services normally over the network and runs on a server
but a server can also refer to a web server which is actual a service but it's sort of like one as it hosts services
i think those are reasonable working definitions
I think a simpler way to define both besides the definition of the server being a piece of hardware, a server in the software sense is a service that serves data. In other words you interact with a server with a request and you should get a response back. It "serves" data.
A service does not need interaction and is pretty much just a random process that keeps running doing the same thing, but a server is a service because it is basically a process that keep waiting for a request to come in so that it can return a response.
"A service is a component that performs operations in the background without a user interface."
~ Android Developers
Services don't just run on servers
Shell services
Services can run from the shell. Unix refers to services as Daemons (pronounced "demons"), and Windows refers to them as services.
Client-side services
Services can run client-side. Mozilla (and other browsers) support Web Workers which run in a background thread. Client-side frameworks, like Angular, support services as well.