on 2020 Jun 03 6:30 AM
Hello All,
We need one help to read PCo file monitor agent logs in MII. We are using PCo 15 version. Sometimes PCo file monitor agent status showing as Started but it is not processing the files. In logs, it is giving some errors. To fix this, we are manually checking the logs and restarting the agents. We saw these logs are written in Windows event logs files as SAP_0001 like this.
Is there anyway to read agent logs in MII? We checked WSDL web service of these PCo agent but no methods available to read the logs. How can we check this in MII?
Thanks,
Senthil
Request clarification before answering.
Hi Senthil,
Reg. the monitoring issue you are facing, have you tried with an auto-restart of PCO agent's from MII.
Below is the list of actions you need to achieve it.
1. Create a transaction in MII which calls the PCo WSDL.
2. Filter the WSDL response for getting all the agent instance name and state.
3. As per your required criteria, you can further get only those agents which are not working
for e.g. the agent's whose state is "Not Started" or "Starting"
4. Filter not working agent you can call the restart instance method available in the same WSDL
5. Set up a scheduled job in Mii which will automatically do the restart as per the interval set.
This should help you from manual monitoring and restarting the agent which is not working.
Hope this helps you.
Regards,
Swapnil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Swapnil, this will not work as according to Senthil the agent instance doesn't go into a faulted state. In addition there is no need to do this in MII as it can all be done in PCo which is far more efficient. I wrote a paper on how to do this with PCo, email me and I can send you a copy if you are interested.
Thanks
Kevin
Hi Senthil,
Since MII is server side, PCo is client side and we dont have a web service allowing you to read the log files you cannot read them from MII.
However what are you trying to achieve by reading them? Maybe there are other solutions.
For example does the status of the Agent Instance stay in the "Started" state or does it go into a "Faulted" state (red icon) ? If so I have a solution that may help you.
We have a Remote Client which is a snap in of the Microsoft Management Console (MMC) that allows you to remotely monitor all your PCo instances including displaying the status, starting/stopping instances and retrieving the log file.
We also provide the PCo Active Monitor which allows you to trigger MII to send an email or SMS if an agent instance changes its status to Faulted.
There are also lots of open source or paid solutions that allow you to automatically monitor windows log files (this is why it writes to the log files) and send messages when particular messages are detected.
And finally what is the root cause of the issue? Why is it failing in the first place, fix this issue then you dont need to monitor it.
Thanks
Kevin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Actually the more I think about it I would say that my initial answer may be incorrect !
I haven't tried this but maybe this will work.
The windows log files are saved onto the servers hard drive so maybe you can configure the file system source system to watch the directory where they are saved, then using a PCo Query in MII you can read the log file.
I found a blog that does something similar https://blogs.sap.com/2016/04/21/monitor-a-local-or-shared-folder-for-a-file-using-pco/ (the relevant section is near the end of the blog).
Thanks
Kevin
Hi Kevin,
Thanks for the update.
The issue is when MII server is in maintenance, PCo servers are still running. During this time if any file received in PCo, it tries to post it but fails. But once MII server was up also, connection is not reset. So it create the issue. But from MII, we are able to connect to PCo. Same issue happening during normal working time also like no file posted for long time then PCo agent going some idle state something. In that time, status is STARTED but in logs, it is giving error. But if we restart agent, it is started to work.
To fix this, we need to manually log into the PCo server and check the logs and then restart. So to fix it automatically, we need to check the logs in MII and if any error, we will restart agent.
Thanks,
Senthil
Hi Senthil,
So it looks like you have two issues that may require different approaches.
1) When MII is down for maintenance - Have you looked at configuring the buffer in PCo so that when MII is down it will buffer the messages until it is back up ?
2) When MII is up - I would be interested in seeing the logs when the error occurs as this is more concerning that when MII is down. I have come across this before on a previous project and it was caused by very short network outages, the PCo buffer also dealt with this situation 😉
Thanks
Kevin
Hi Kevin,
Please see the details.
For the first question, - Yes. It is set. It is sending the data when MII is up.
For 2nd question, it is happening frequently as MII is up and PCo server is down. When it is restarts, it is failed to send the data. But still status showing as Started. It is showing error as - "Invalid URI or URI is empty in XMIIMessageHandler category". for this, how can we fix it?
Thanks,
Senthil
User | Count |
---|---|
3 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.