Logging to Google Cloud Logging from log4net - asp.net

I have an asp.net web application that emit logs via log4net. I need to get the log messages over to Google Cloud Logging. What is the best way to do this?
Based on fluentd documentation and Google Cloud documentation, the best I can come up with now is:
On the Windows machine where the web app is runnning, have log4net log to local files.
On the same machine, run nxlog and have it ship the log files to a Linux machine.
Have google-fluentd, running on the Linux machine, transmit the logs to Google Cloud Logging API.

An easier solution path than the one I started with is to use the Google Cloud Logging API Client Library for .NET.
Currently at v1 beta 3 it's based on the Google Cloud Logging API and has a nuget package.

Related

How to synchronize apis to external system

I have deployed WSO2 API manager4.0.0 All-in-one on my vms.
They are working fine.
Now ,there is a external system of my company , wants to get all apis from wso2apimanager, the apis will list in their system, and they want to invoke wso2 apis from their system.
Anyone can guide me?
You can export APIs using the apictl command line tool as in [1]. But these projects are only readonly from the WSO2 API Manager. You can use the Swagger definitions and host them in a 3rd party system.
[1] - https://apim.docs.wso2.com/en/latest/install-and-setup/setup/api-controller/ci-cd-with-wso2-api-management/

Firebase CLI authentication problem in cloud shell

I'm trying to deploy a test web application using Firebase. I found this Google documentation to deploy a test application 1. I am able to clone a Github repository and enable Firebase on the project. The Firebase web app was created, and I used my Google account as an authentication method. I enabled the web app in Cloud Firestore, and everything seems to be working fine on the Firebase side.
My project is being deployed using GCP and running the application using Cloud Shell. The Firebase version installed is 9.22.0. I got to the point where I need to authorize the Firebase CLI with the following command:
firebase login
According to the instructions, I'm supposed to get the following message: “Allow Firebase to collect CLI usage and error reporting information?” and authorize by pressing Y, and enter to generate an URL. I need to paste the URL in the browser to authenticate with the account being used to generate a verification code and then use it in the Cloud Shell prompt.
Once I run the firebase login command, it never prompts me with “Allow Firebase to collect CLI usage and error reporting information?” It generates the link, and I paste it in the browser and I get the following screen:
I have tried cleaning the browser cookies thinking it was a browser issue, but I kept getting the same error. I have tried different browsers, but keep getting the same error. I recreated the project several times, but Cloud Shell never prompts me to allow Firebase. I have created the project in another GCP account, and we have the same problem. The instructions were followed according to the documentation, but I cannot move forward because it is not allowing me to authorize the Firebase CLI. Does anyone have any insight on the issue? Any help would be very welcome.
1 https://firebase.google.com/codelabs/firebase-web#3
As mentioned in this documentation:
The firebase login command opens a web page that connects to localhost on your machine. If you're using a remote machine and don't have access to localhost, run the command with the flag --no-localhost.
Run the following command in your terminal:
firebase login --no-localhost
Tried the steps in the documentation you provided and I was able to launch the app successfully.

How to deploy Azure Fabric service on IIS?

I have developed a Azure Service Fabric service .Net core 2.2 which contains a controller and some API methods inside it. I deployed the service on local cluster and its working fine. I am able to access the api endpoints.
But now I need to deploy it on local IIS too. I published the service project that contains my controller, and when I try to deploy it on local IIS as we usually do while deployment of other apps, I get an error "HTTP Error 500.0 - ANCM In-Process Handler Load Failure". I am googling for this and trying to find solution but no success yet.
Is there any particular setting or process that needs to be followed to deploy Azure Service Fabric service on IIS ? I am unable to figure out what I am missing.
Any suggestions or ideas?
When you create a Service Fabric service, the runtime need to talk to the Service Fabric System Services at startup. If you deploy it to IIS, it does not have a cluster to talk to.
If you want to make an API flexible to be hosted either on Service Fabric or IIS, you need to decouple the hosting logic from the API.
In this case, you can either create two different hosts, or:
in the host entry point, check if you are running inside SF, if yes you start the Service Fabric Service otherwise you start a self-hosted or IIS version.
There are quite a few questions in SO with examples like this, worth a search to check which one fits your needs.

Deploying asp.net web api to azure app service

Problem: after deploying my asp.net core web api to azure app service I can't get a response from the expected endpoint
Steps followed:
I have an api that works fine when serving from my local machine, developed using Visual Studio Code. (The code for that is here https://github.com/samrae7/blog-api FYI)
I followed the instructions in this video: https://www.youtube.com/watch?v=C8J_CRy2_XA to push the files up to Azure App services. Basically I used the VS Code azure app service extension to create a webapp on azure and push my files.
I can see my files have been pushed to Azure ( by logging in to the portal and looking) but when I navigate to the expected URL of my api, http://sams-blog-api.azurewebsites.net, I get 'site not found'. If I try to send a request to the expected endpoint (I append /api/resource as this is the path of the endpoints on my local machine) I get '404 not found'
So my question is what do I have to do to actually get my api up and running online after pushing the files to azure app service
Thanks
Your website is not accessible due to missing DNS entry. I check it using the mxtool
https://mxtoolbox.com/SuperTool.aspx?action=a%3asams-blog-api.azurewebsites.net&run=toolpage#
Please ensure that your url is correct.
The basic answer to this question was that I had not understood that you have to create a Database in azure for your deployed app to connect to, and you need to set the connection string as an env variable in azure so that it knows where to look, and you should also add code that automatically updates the database on launch.
This tutorial was what helped with that: https://learn.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-dotnetcore-sqldb
I then hit another issue where the deployed app was still returning a generic 500 server error. By enabling 'Diagnostic logs' via the azure portal, and downloading the logs, I saw this detailed error: The configuration section 'httpProtocol' cannot be read because it is missing a section declaration referring to a piece of config in my Web.config. I deleted it (I don't need it for now) and that fixed the issue

About Apache Ignite Monitoring

I Have Build and Deploy Ignite Web Console Locally.And Start Manager Console on http://localhost:9000/ But problem is there no Monitoring Option Available.Can Anybody Explain How To Monitor Apache Ignite Locally via Web Console
This is catch monitoring tab is only available in grid gain hosted ingite web console.
so frustrating but I also got same issue.
http://apache-ignite-users.70518.x6.nabble.com/Setup-Web-agent-and-Web-console-on-locally-td8341.html
According to documentation, this is an enterprise feature and not available in the open-source version.
https://apacheignite-tools.readme.io/docs/ignite-web-console
The web console also features cluster monitoring functionality (available separately as GridGain plugin) that shows various cache and node metrics as well as CPU and heap usage.
If you have the enterprise edition, it should be possible to deploy your own instance for monitoring. The following documentation contains more details.
http://docs.gridgain.com/docs/deploy-web-console-from-docker-image

Resources