I decided to post this question because, I have ran out of debugging ideas, just ideas are golden since I know it can be difficult to help debugging a virtual instance through here (debugging code is hard enough jaja). Anyway, I have created a virtual machine in Compute engine , I created a logs file that I populate, for example, with this command in a python script, let's call it logging.py:
import logging
logging.basicConfig(filename= 'app.log' , level = logging.INFO , format = ' %(asctime)s - %(name) - %(levelname)s - %(message)s')
logging.info('Some message ' + str(type(variable)))
everytime I use python3 logging.py , the app.log is effectively populated. ( Logging.py and app.log are in the same directory the /home/username/ folder )
I want stackdriver to show this log in the logging viewer everytime it's written, so , I installed the stackdriver agent as follows, in the virtual machine command line:
$ curl -sSO https://dl.google.com/cloudagents/install-logging-agent.sh
$ sudo bash install-logging-agent.sh
No errors that I see are delivered here, in fact, you can see here the messages obtained
Messags on the stackdriver viewer:
After this, I proceed to create a .conf file that I create in /etc/google-fluentd/config.d/app.conf
with this parameters
<source>
type tail
format none
path /home/username/app.log
pos_file /var/lib/google-fluentd/pos/app.pos
read_from_head true
tag whatever-tag
</source>
After that is created, I launch sudo service google-fluentd restart.
Aftert I execute, python3 logging.py , no logs are added to stack drivers logging viewer.
So, where might Have I gone wrong?
Things I have tried/checked:
-Have more than 13 gygabytes of RAM available
-If I run logger "some message" on the command line, I effectively add a log with "some message" to the log viewer
-If I run
ps ax | grep fluentd
I obtain :
3033 ? Sl 0:09 /opt/google-fluentd/embedded/bin/ruby /usr/sbin/google-fluentd --log /var/log/google-fluentd/google-fluentd.log --no-supervisor
3309 pts/0 S+ 0:00 grep --color=auto fluentd
-Both my user, and the service account I use, have logger admin permission in IAM roles.
-This is the documentation I have based myself on:
https://cloud.google.com/logging/docs/agent/troubleshooting?hl=es-419
https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list?hl=es-419
https://cloud.google.com/logging/docs/agent/configuration?hl=es-419
https://medium.com/google-cloud/how-to-log-your-application-on-google-compute-engine-6600d81e70e3
https://cloud.google.com/logging/docs/agent/installation
-If I run sudo service google-fluentd status , the agent appears active.
-My instance hass access, to all the apis. It's an n1-standard-4 (4 vCPUs, 15 GB of memory) using ubuntu linux 18:04
So, what else can I check to debug this? I'm out of ideas here , hope I'm not being an idiot here :(
Based on my understanding, I think that you looking for the following fluentd resource types:
generic_node
“A generic node identifies a machine or other computational resource for which no more specific resource type is applicable. The label values must uniquely identify the node.”
generic_task
“A generic task identifies an application process for which no more specific resource is applicable, such as a process scheduled by a custom orchestration system. The label values must uniquely identify the task.”
The source of my information has been found here
This document explain how to send logs from your application in different ways:
Cloud Logging API
Cloud Logging Agent
Generic fluentd
As you mentioned having installed fluentd, let me provide more focused documentation about Cloud Logging Agent. I also found some python Client Library documentation that you may be interested.
Finally, I found a nginx/apache use-case guide that you may use as reference.
For some reason, if I change the directory to which both the .conf file points, and the directory where the logg is to /var/logs/ , being the final path as /var/logs/app.logs, it does work correctly. Possibly there is a configuration issue, causing the logging agent to only capture logs in specific predetermined folders, or a permissions issue that stops it from working if the log is in the username directory.
I found this solution, however, by chance(random testing basically.
). Did not find anything in the main articles that are supposed to teach me how to configure the logging agent, that could point me in the right direction, being those articles this ones,
https://cloud.google.com/logging/docs/agent/troubleshooting?hl=es-419 https://cloud.google.com/logging/docs/reference/v2/rest/v2/entries/list?hl=es-419 https://cloud.google.com/logging/docs/agent/configuration?hl=es-419 https://medium.com/google-cloud/how-to-log-your-application-on-google-compute-engine-6600d81e70e3 https://cloud.google.com/logging/docs/agent/installation
If I needed it to work in my username directory, it's not clear just by checking this articles how to do it,what configuration file I would need to change or where to start, so I recommend to google to improve that aspect of the docs.
This documentation you have sent https://docs.fluentd.org/quickstart is pretty interesting, maybe I can find the explanation there, thank you for your help.
Currently i am trying to use AXL to query Phone status.
I am building python web application to query status of phone in call manager.
<SOAP-ENV:Envelope xmlns:ns3="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns0="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://schemas.cisco.com/ast/soap/"
xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header/>
<ns2:Body>
<ns1:SelectCmDevice>
<CmSelectionCriteria xsi:type="ns1:CmSelectionCriteria">
<Class xsi:type="tns:DeviceClass">Phone</Class>
<ns1:SelectBy xsi:type="ns3:string">Name</ns1:SelectBy>
</CmSelectionCriteria>
</ns1:SelectCmDevice>
</ns2:Body>
</SOAP-ENV:Envelope>
I am expecting it to give all Phones. But it's not giving Phones with Status as None.
Please point me to right documentation to query devices with None Status.
The CUCM Risport SOAP service will contain data only for devices that have registered with CUCM at some point since the last CUCM restart (and within the last ~48hrs) - devices which have never registered will not appear.
You may need to use the CUCM AXL SOAP API (i.e. <listPhone> ) to get a full listing of configured devices, then compare with what you get back from Risport SOAP to determine the never-registered devices.
I've been trying to set up Analysis Service. I've followed the step by step guide mentioned in the link
https://learn.microsoft.com/en-us/sql/analysis-services/instances/configure-http-access-to-analysis-services-on-iis-8-0?view=sql-server-2017.
However, I'm still unable to configure this.
I'm getting following Errors in Browsers:
<?xml version="1.0"?>
-<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
-<soap:Body>
-<soap:Fault xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<faultcode>XMLAnalysisError.0xc10e0002</faultcode>
<faultstring>Parser: The syntax for 'GET' is incorrect.</faultstring>
-<detail>
<Error HelpFile="" Source="Unknown" Description="Parser: The syntax for 'GET' is incorrect." ErrorCode="3238920194"/>
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
I have checked Event Log below is the error I could see:
The description for Event ID 25 from source MSOLAP ISAPI Extension: \\?\C:\inetpub\wwwroot\OLAP\msmdpump.dll cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
msmdsrv.rll
7177
Not sure if I'm missing something here..I've searched for this error however without any luck. Any sort of help would be greatly appreciated.
The msmdpump.dll does not service GET requests, only POST messages. When you browse to http://your-server/OLAP/msmdpump.dll this SOAP error is what you should expect to see. In the setup instructions you linked in your message, at the bottom you will see Step 6: Test your configuration. Item 3 is what you want to do next:
"In Management Studio, in the Connect to Server dialog box, select Analysis Services as the server type. In Server name, enter the HTTP address of the msmdpump extension: http://my-web-srv01/OLAP/msmdpump.dll."
I'm referring this tutorial to create a device identity. However, getting an exception as below:
Here is my config file:
Edit:
What is this Instrumentation key and value in App.Config? I just copied from the sample code. However, from where can I get it, in case I'm using a real device?
Am I missing any SDK or anything else?
Do I need to download something extra? the tutorial does not suggest anything.
Even when I'm running sample code from GiTHub getting the same error.
the following screen snippet shows a reason of this error, such as connectionString.
Use the connectionString from your Azure IoT Hub - see the tutorial section Create an IoT Hub step 6.
Can you check that the connection string you're using is in the correct format. It should look like:
"HostName={your hub name}.azure-devices.net;SharedAccessKeyName=iothubowner;SharedAccessKey={your key}"
You can copy the complete connection string from the portal as described in the tutorial.
Issue resolve: I was missing my connection string.Which I got from "IoTHubOwner" from Azure portal login. :)
I need to support multiple devices including both serial and BLE. When i add the following code to Package.appxmanifest file, i get an error
Unable to activate Windows Store app 'blah.blah_blah!App'. The activation request failed with error 'E_INVALIDARG'.
<m2:DeviceCapability Name="bluetooth.genericAttributeProfile">
<m2:Device Id="any">
<m2:Function Type="name:heartRate"/>
</m2:Device>
</m2:DeviceCapability>
<m2:DeviceCapability Name="bluetooth.rfcomm">
<m2:Device Id="any">
<m2:Function Type="name:serialPort"/>
</m2:Device>
</m2:DeviceCapability>
I have reappeared your project’s error. If you just add Bluetooth.genericAttributeProfile or Bluetooth.rfcom, that is ok. So I think the error caused by citing repeatability and you can follow the below step to add Bluetooth and add all Bluetooth’s services.
in the code Behind, you could add RfcommDeviceService by var rfcommDeviceService = Windows.Devices.Bluetooth.Rfcomm.RfcommDeviceService;
and add gattDeviceService by var gattDeviceService = Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService;.