Closed borzel closed 4 years ago
What about a Log-Collector-Plugin?
That could be developed separated from XCP-NG Center, but maybe automatically installed with it. (Was thinking about that a few weeks ago, if an own plugin would be good for the zstd-export)
Then the Plugin could collect all the logs as an archive from the server(s) and maybe even do some simple parsing for ERROR or something like that and highlight them in red. Similar to CMTrace (https://www.pei.com/2018/05/review-log-files-cmtrace/) or simply use that tool, saves time to develop it.
I don't know if it would need an additional server-side plugin to collect the logs and create an archive, but I think so.
I think there is already some stuff like that in XenCenter. Can you check the source and see what it calls? (in XAPI)
Yes you're right, the bug tool seems to use this: https://github.com/xcp-ng/xenadmin/blob/master/XenModel/Actions/ZipStatusReportAction.cs
have to search some more ...
I'm very unfamiliar with XC source code so if you can point the XAPI call behind it, this will be also helpful for XO! :+1:
A bit short of time, but found this:
https://github.com/xcp-ng/xenadmin/blob/master/XenModel/XenAPI/HTTP_actions.cs#L157
coming from here:
https://github.com/xcp-ng/xenadmin/blob/master/XenModel/Actions/Host/SingleHostStatusAction.cs#L80
Yes, the status report is the feature and it collects much more than only some logs (db, rrds ...). Additionally in the server properties is an option to set a remote log destination ... I have not used it, might be rsyslog.
System-Status can also be downloaded with a web browser (dialog for authentication will popup) like this:
http://YOURXCP-NG-Server/system-status/?entries=system-logs,xenserver-logs&output=tar
with everything selected in XCP-NG-Center it calls the following on the server:
running /usr/sbin/xen-bugtool --entries=device-model,fcoe,firstboot,network-status,process-list,client-logs,xapi,xenserver-databases,control-slice,host-crashdump-logs,disk-info,hardware-info,high-availability,xha-liveset,xen-info,message-switch,kernel-info,loopback-devices,multipath,xcp-rrdd-plugins,system-logs,xenopsd,vncterm,xenserver-config,xapi-debug,xenserver-install,xenserver-logs,network-config,yum,pam,boot-loader,conntest,VM-snapshot-schedule,tapdisk-logs,system-services,blobs,xapi-subprocess,xenserver-domains,CVSM --silent --yestoall --output=tar --outfd=be6dd2f3-cbd0-9332-21b5-23a4962ec796
2019-02-16 update: was missing some status report "entries", now these are all that you get when selecting all checkboxes in XCP-NG-Center
As I have no spare time I close this :-(