Display content of file in zabbix - monitoring

I have zabbix server to monitor linux server, I am trying to read daily backup file and display all contents of file on zabbix, how can I do that.
I tried to do the following:
first item
TYPE: Zabbix_agent (Active)
log[/var/opt/backup,]
second item
TYPE: Zabbix_agent (Active)
vfs.file.contents[/var/opt/backup]
but there is no data retrieved, and should I do anything in trigger...

Make sure that the EnableRemoteCommands parameter is set to 1 and uncommented in the respective zabbix_agentd.conf. Note: Remote commands do not work with active Zabbix agents.
Create an item with that key: system.run[cat /var/opt/backup]. Don't forget to choose the appropriate "Type of information" when creating the item.

Related

SAP Fiori Default Values App: "no editor metadata" / "no configured plugin"

My customer set up a new S/4HANA system and installed some Fiori apps. When I go into my user settings in the Fiori LaunchPad and navigate into the Default Values tab, I:
don't get a value help,
entered values, e.g. Controlling Area, are not propagated into the backend's user parameter's (SU01).
Per Chrome Developer Tools I get the following error messages. I suspect that something is misconfigured causing the above 2 observations?
The following parameter names have no editor metadata and thus likely no configured plugin:
"AssetDepreciationArea",
"CompanyCode",
"ControllingArea",
"CostCenter",
"ExchangeRateType",
"FinancialStatementVariant",
"FiscalYear",
"FunctionalArea",
"GLAccount",
"GLAccountHierarchy",
"InternalOrder",
"Ledger",
"LedgerFiscalYear",
"Material",
"MaterialGroup",
"MaterialType",
"Plant",
"ProfitCenter",
"Segment",
"StatisticalKeyFigure",
"StorageLocation".
This has been resolved. The issue was a misconfiguration. The customer has added the correct navigation targets in the respective catalogues. This solves problems (1) and (2).

Problem with saving the product PrestaShop 1.7.6.7 + multistore

When saving the product (more precisely, changing the number of main items or in combination) with the multistore option enabled (only in the context of all stores), an error appears. Interestingly, after the second or next (how many stores in multi, how many times you have to click) the record goes correctly.
Recreation:
Go to BO >> set the shop context to >> "all shops"
go to the PRODUCTS tab >> edit the selected product >> change the STOCK (QUANTITY) to another >> click SAVE
I get a red message "Unable to update settings." and there is a problem with writing.
I get an error in JS console:
Failed to load resource: the server responded with a status of 500 (Internal Server Error).
There is no error in the NETWORK tab, despite the debugging mode enabled in Presta.
Screenshots:
https://prnt.sc/uj2uf2
https://prnt.sc/uj2ul7
https://prnt.sc/uj2v5f
https://prnt.sc/uj2w5v (headers)
https://prnt.sc/uj2w13 (preview)
https://prnt.sc/uj2vr8 (initiator)
https://prnt.sc/uj2vuk (response)
Data for the demo version:
This is the original, freshly installed version.
Only the multistore has been enabled and one demo store has been added. That's all.
BO: http://bielizniana.pl/__test/admin758a9z7cn/
Login: test#test.pl
Password: test#test.pl
You have set your multistore option "Share available quantities to sell" to NO.
This means when you are editing the product in All shops context it does not know what to do with your quantities.

Logstash with jdbc driver-How to set an initial value for sql_last_value

According to Logstash documentation the sql_last_value parameter is set to Thursday, 1 January 1970 before any query is run, and stored in the YAML file according to the last_run_metadata_path parameter.
I need to set this value to a custom value, but because I used Logstash inside a Docker container, I wasn't able to use a custom image with a file initialized with the desired value because the file is read-only in the container and then Logstash throws an error.
My question is: is it possible to start Logstash with a different initial value than the default in a container installation?
Thanks.
You can have a workaround. Logstash allows you to define a file in which it will store the last value that sql_last_value had. When logstash starts the jdbc will look in that file (if defined in the settings), store the value to the sql_last_value parameter and continue from there.
You can create that file and write the date you want to start with. That way the driver will think it stopped there the last time. Here's how you can do it:
In the logstash.conf add the following:
input {
jdbc {
last_run_metadata_path => "/some/path/sql_last_value.yml"
# ... other configuration bits
}
}
Write the date you want to start with to the sql_last_value.yml file in the following format:
--- 2020-06-12 20:28:00.374000000 Z
You can easily create the file with a simple command in your dockerfile.

I get error "Failed to create /kylin. Please make sure the user has right to access /kylin" on starting kylin

Whole error is
Retrieving hadoop conf dir...
KYLIN_HOME is set to /data/kylin
Error: JAVA_HOME is not set and could not be found.
Failed to create /kylin. Please make sure the user has right to access /kylin
I have set JAVA Home and path too but it still doesn't work
check the value of entry kylin.env.hdfs-working-dir in your $KYLIN_HOME/conf/kylin.properties file (by default it's /kylin as is shown by your error message), and check whether you have access to this directory on hdfs.

Problem installing windows service

I am having a problem installing a Windows service. I installed and uninstalled the service numerous times (installutil..... installutil /u) without any problem but something went wrong and now when I attempt to install, I get the error message listed below. I checked the computer management console, and service CIMediator does not appear on the list of services. How do I remove the service?
System.ArgumentException: Source CIMediator already exists on the local computer.
Just solved the same problem, also after a numerous uninstalls/installs/restarts.
I have my own implementation of service installer (derived from [System.Configuration.Install.Installer][1]), and I have specified application EventLog as following:
public ProjectInstaller()
{
InitializeComponent();
EventLogInstaller installer = FindInstaller(this.Installers);
if (installer != null)
{
installer.Log = "MyService";
}
}
You might have the same feature implemented the following way ([MSDN: EventLog.CreateEventSource Method] [2]):
if(!EventLog.SourceExists("MySource"))
{
EventLog.CreateEventSource("MySource", "MyNewLog");
}
In my case, during some of the installs EventLog was successfuly created, but during uninstall something went wrong, and EventLog was not removed (although it was not displaying in EventViewer, it was still present in the registry).
So the error "MyService already exists on the local computer", was obviously error about EventLog, not the service itself.
You could try to do the following:
Go to your Start menu and type regedit. This will open Registry Editor. Be careful with it, it is always recommended to back up the whole registry before doing anything (File -> Export), or only the keys you are about to edit/delete.
Open Edit -> Find , type CIMediator and leave only Keys checked. Your service name should appear as key multiple times, on following locations
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\eventlog\CIMediator,
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\services\CIMediator,
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\CIMediator,
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\CIMediator
Try to delete these keys. It worked for me.
1
2
Check to see if the key is still there in the registry.
HKLM\System\CurrentControlSet\Services\CIMediator (probably, unless the key is defined differently)
If it is, export the key to a .reg file and then delete it.

Resources