logtop | Display real time statistics | Runtime Evironment library
kandi X-RAY | logtop Summary
kandi X-RAY | logtop Summary
logtop displays a real-time count of strings received from stdin. It can be useful in some cases, like getting the IP flooding your server:.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of logtop
logtop Key Features
logtop Examples and Code Snippets
Community Discussions
Trending Discussions on logtop
QUESTION
I'm looping through a dictionary of objects constructed from JSON, and I'm creating vertices from them using networkx. The problem I'm experiencing is that some of the JSON object have missing properties, and if I do this:
...ANSWER
Answered 2019-Jul-10 at 01:06I do not have the reputation for a comment, so despite this not being a full answer, I am posting it as such
Have you tried simply excluding the properties that are missing from your add_node
step?
That is, instead of providing a key value pair where the value is None
, don't provide a key/value pair at all if the key is missing.
You can probably achieve this quite easily by loading your json using python and then just unpacking your component:
QUESTION
I'm building an application where I can see realtime changes within the logs This application is build with the Symfony v4.1. There is this bundle that has a Web Socket server and client based on Ratchet and Autobahn.js
I've setup all the requirements to make it work according to the documentation.
There's a Topic class:
pubsub routing is configured
The server runs
Client runs in javascript when page is loaded
The script to connect works fine, until I subscribe to a channel/topic. The connection is immediately closed on the client side, without the server detecting it. Does anyone know how to solve this? Also, I'm curious what this responsecode WS-1007 means.
Javascript:
...ANSWER
Answered 2018-Sep-13 at 12:19So, I've found the solution eventually, the topic needs to be tagged in your services configuration
services.yaml:
QUESTION
Problem
Currently, our website is setup so that when an action is taken that requires an email to be sent, our website will make a call the the SMTP server to attempt to send an email. The problem lies when the SMTP server goes down for whatever reason. We don't store any outgoing emails in any fashion so if the email to be sent fails, it's is lost forever (not really as it can easily be regenerated, but we don't have a mechanics to let us know it failed, except Azure Application Insights
). While we also have the website send the devs an email when exceptions occur, for obvious reasons, we will not receive those emails.
Goal
Our goals is to stop having our website send an email directly to the email relay server. Instead, implement a solution that would send emails and have the ability to recover should a problem occur.
- Stop the website from sending the emails
- Ability to recover from transient or side issues/exceptions
- Log as much activity as possible concerning the email (send attempts/fails/etc)
- Ability to recover the activity logs from potential transient or side issues/exceptions
- Ability to re-trigger a email to be sent if ever necessary (optional)
Solution
I read a 3-part article that sounds like it would solve this issue and I'm currently developing it.
I'm building a process using Microsoft.Azure.ServiceBus Topics
and Subscriptions
to manage sending emails from our website. I've gone through many samples and have been successfully able to SendAsync()
a Message
, ReceiveAsync()
a Message
, and CompleteAsync()
or AbandonAsync()
it appropriately.
Side-note: I'm now exploring how to work with the RetryPolicy to see if this will help me defer a retry to a bit of a longer period, though I'm not sure if I can/should use it for that.
While most of the process has been built so far, so I can understand the underlying infrastructure, I'm also still within the planning phase to make sure we plan appropriately.
We are currently trying to figure out the best or most appropriate workflow for this process. We figured two Topics
would be needed: one for the emails to be sent EmailTopic, and one for the logs to record LogTopic.
The reason for the LogTopic
is to handle any transient issues when attempting to save a log activity to the database. For example: I successfully retrieve an email to be sent. I then attempt the send the email and log this attempt. The email gets sent successfully. I then try to log this activity, but the database just went down and I'd would not be able to log this activity. The second Topic
should alleviate that, but what happens if that goes down?
Here's our current workflow:
- Website inserts data into a database that defines the email to be sent (currently, we'll have a field for the
Body
which will be the email contents itself, another table to hold theEmail Templates
which will contain the contents around theBody
field, along with from, to, CC, BCC, and file attachments) - Website sends a small
Message
to theEmailTopic
with theMessageId
of the inserted record - A
Stateless Service Fabric Service
listens for messages - Receive the
Message
, get all details from the database for the record - Build the
SMTPClient
and attempt to send the email to the SMTP server - Send a
Message
to theLogTopic
with theMessageId
, current date, currentDeliveryCount
, and action taken (attempt to send email)- If successful,
CompleteAsync()
theMessage
and send aMessage
to theLogTopic
with theMessageId
, current date, currentDeliveryCount
, and action taken: "email sent" - If unsuccessful,
AbandonAsync()
theMessage
and send aMessage
to theLogTopic
with theMessageId
, current date, currentDeliveryCount
, and action taken: "email failed to send" (after 10 attempts message would automatically be placed in theDeadLetterQueue
- If successful,
In this workflow, the LogTopic
will contain all the actions taken and will be stored in the database when the message(es) is(are) received. Obviously, if messages are abandoned for any reason and sent the the DeadLetterQueue
, we will have a process to try to insert them at a later point.
Questions
- We thought about just storing logs to the database within the workflow, but the question "what if the db goes down in the meantime?" (hence when Azure Central US went down last week) came up so we decided to use this 2nd
Topic
. Obviously, if theService Bus
is down, we can't send this message and I don't know how to recover from that, except log ETWs and check them some other way. Should I be attempting a DB save first, and if that fails, send aMessage
to theTopic
? - Are there too many things going on in this service and should I split some operations around?
- Is there a flaws or missing items in the workflow itself that we aren't taking into consideration?
- Should we be using 1
Topic
and add aLabel
to the message so we know it's a log vs email to be sent? Maybe using filters (not sure how to properly do this or if it's appropriate for this workflow yet)? - Are we asking too many questions in this 1 SO post and should split each question apart?
ANSWER
Answered 2018-Sep-09 at 08:28I think the work flow can be improved in such a way that the failures can be tracked and resolvable. I am providing my solution in achieving this.
Service Bus Topics supports multiple subscribers for single sender. This is achievable with the help of Subscriptions.
Instead of sending the message to two Topics, You can create two Subscriptions under a Topic. Refer here for filtering messages into Subscriptions using Rules.
You can create different Rules for the Subscriptions. Once the message is sent to a Topic, the custom properties of the message gets validated against the Rules of each Subscription. Based on the result of the validation, the message will get into the Subscription which has the required Rule condition.
Lets say the Subscriptions created are Email and Log. The Stateless Service Fabric Service should listen for the messages form both these Subscriptions.
Website should send the message to the Topic with the custom properties for Email Subscription.
Whenever a message is received by the Stateless Service Fabric Service, it should start a thread to send the mail.
Once the email is sent successfully, a Success message should be sent to the Topic with the custom properties for Log Subscription. In case of failure in sending mail, the message in Email Subscription should be dead lettered and a Failure message should be sent to the Topic with appropriate custom properties for Log Subscription.
The Stateless Service Fabric Service which listens also for the messages from Log Subscription will create a thread to write to the database as and when a message is arrived. In case of failure in writing into database, the message in Log Subscription should be dead lettered.
You can monitor the count of the dead letter messages of both the Subscriptions to ensure there is no failure. If the count is greater than 0, there should be manual intervention in Resubmitting the dead letter messages to the Topic. There are may tools available in market to monitor and resubmit the dead letter messages or you can also develop a custom application for doing that.
I guess this workflow should work as expected. Once this is installed, the only thing that need to be taken care is the dead letter messages in both the Subscriptions.
QUESTION
I'm trying to make a POC using log4j JMSappender and ActiveMQ. I successfully follow this example -> http://activemq.apache.org/how-do-i-use-log4j-jms-appender-with-activemq.html
But this is for INFO level. I made some modification to use it in DEBUG level and my program and activeMQ can't exchange their wire format. Here are my log4j (client side)
...ANSWER
Answered 2017-Jan-17 at 14:28yes it is due to AMQ logs if level is debug, one solution is to do the opposite like this :
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install logtop
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page