Looking for solution for zabbix to get fresh value (not from db) for $itemid via command line interface.
Force Zabbix server or proxy to poll a new value from a item.
php command $itemid
response: value
Forcing Zabbix server or proxy to poll a value for a passive-like item is not supported at this time. There is a feature request to add such a capability: https://support.zabbix.com/browse/ZBXNEXT-473 .
You can script around zabbix_sender on destination host to send data on zabbix server, but it requires item key be "Zabbix trapper" type and periodical send should be configured on destination server scheduler.
Related
On the ESXi server (I connect via SSH), I execute the command to view the SMART disk:
esxcli storage core device smart get -d=t10.ATA_INTEL_SSDSC2BB080G4__PHSL4
How can I pass the received data to Zabbix?
I'm trying to create an Item with type "script". I create this Item in a template. The template already connects to ESXi using macros, Zabbix receives data. But in the script field of the Item, you simply cannot insert this command, you just need to write the script.
In Zabbix a Script is a command you can execute using Host the context menĂ¹, or a command you can execute as an Action, when a Problem is triggered.
An item to perform a command via SSH, should use the "SSH agent" item type.
You cannot perform an esxcli command through the vSphere HTTPS SDK with Zabbix.
See
https://www.zabbix.com/documentation/6.0/en/manual/web_interface/frontend_sections/administration/scripts
https://www.zabbix.com/documentation/6.0/en/manual/config/items/itemtypes/ssh_checks
Example:
I have made a magic script on Zabbix agent and i wanna to execute on Zabbix agent using Zabbix item.i will be thankful to you in advance for this . do something if you can.
You would create a user parameter that would look like any other item from the server side. On the agent side, you would have to edit the agent configuration file and restart the agent.
In addition to user parameters, Zabbix supports remote commands. These are appropriate (and indeed invoked from) actions as a result of some condition. So in the answer from Richv you would use that for polling for data, e.g. to find out if a process is running. Continuing that example, if the process is not running and you wanted to start it, you can ask the agent to execute a command that might start the process. To do that you must enable remote commands in the agent config file, and configure it as an action (that in turn is linked to whatever condition you had concerns about).
1st in the zabbix_agentd.conf for the remote host, add EnableRemoteCommands=1
Then see the video at https://youtu.be/G6jfahBZwlk
In the video, a bat file is created on the remote host, and then an item is created for the remote host using the Zabbix server interface, and selecting the system.run option in the key options.
I have created a bucket in my local system and I am trying to connect another node which is located in a remote server. I am able to work with the nodes separately. But I need to join these two nodes to form a cluster. Is there a way to add the remote server node into my local server by using the web UI?
When I tried to add the remote server's IP address by clicking "Add Server", I am getting the following error.
"Attention - Prepare join failed. Authentication failed. Verify username and password. Got HTTP status 401 from REST call post to http://XXX.XXX.XXX.XXX:8091/engageCluster2. Body was: []"
I used my local server's username and password. If I give that server's username and password, I get this error.
Attention - This node cannot add another node ('ns_1#XXX.XXX.XXX.XXX') because of cluster version compatibility mismatch. Cluster works in [4, 1] mode and node only supports [2, 0].
Is there a way to link them using Java API? Can someone please help me with this?
I read Couchbase Rebalancing document (http://blog.couchbase.com/rebalancing-couchbase-part-i) and it wrote : "A client losing its connection to the cluster will attempt to reestablish (configurable). Anytime it reconnects (first time or not) it gets the latest map that the cluster has. Ironically, a flaky network in theory might just help here to keep the map constantly updated during a rebalance, but that's for a different discussion."
I use Spymemcached 2.7.3 and how can i achieve that.
I give an example: My Java client add two server (10.0.0.40 and 10.0.0.15, use URL) to connect to Couchbase cluster. But in reality, when 10.0.0.40 down, the persistent connection did not keep. I have to restart my client to switch to 10.0.0.15. How can my client can re-connect to 10.0.0.15 when 10.0.0.40 down without restart my application.
Updated:
I use below code to connect to Couchbase cluster:
ArrayList<URI> listAddr = new ArrayList<>();
listAddr.add(new URI("http://10.0.0.40:8091/pools"));
listAddr.add(new URI("http://10.0.0.15:8091/pools"));
listAddr.add(new URI("http://10.0.0.16:8091/pools"));
client = new MemcachedClient(new BinaryConnectionFactory(), listAddr, "test", "test", "");
I want to my java client auto reconnect to another server in pool (40,15,16) to get topology (when my java client's still running) if the first server in pool (40) failed.
Can i achieve this purpose with spymemcahce or i have to move to Couchbase Java SDK.
spymemcached java client dos not handle membase fail over for particular node.
You can check here .
If you update your java client to couchbase java client, then you can handle fail over by removing failed node from cluster.
for more information you can check here or here
I have an SSIS package I can import into Integration Services on my server and run with no problems. All it does is copy files from a directory on the network to the server it is running on.
When I execute the SQL Agent Job it says the job ran successfully but no files are copied. I verify there are files in the source location and the destination path exists. I am also using absolute paths (no mapped drives).
Why doesn't it copy any files when I run it as a SQL Agent Job?
FYI - the source directory is actually on a UNIX box and to map a drive to that location you have to enter a user/password combination.
I have a feeling that the SQL Agent Job runs as NT SERVICE\SQLSERVERAGENT, which is not the user that has permission to the UNIX box. Is there a way to run the SQL job as a specific user?
Thanks in advance.
You need to create a Credential, a SQL Agent Proxy, and then assign the proxy account to the SQL Agent job step. Proxy accounts are specific to each subsystem (e.g Powershell, CmdExec, SSIS, etc.)
-- creating credential
USE [master]
GO
CREATE CREDENTIAL [Superuser] WITH IDENTITY = N'DOMAIN\account', SECRET = N'mypassword'
GO
-- creating proxy for CmdExec subsystem, adding principal
USE [msdb]
GO
EXEC msdb.dbo.sp_add_proxy #proxy_name=N'My custom proxy',#credential_name=N'Superuser',
#enabled=1
GO
EXEC msdb.dbo.sp_grant_proxy_to_subsystem #proxy_name=N'My custom proxy', #subsystem_id=3
GO
EXEC msdb.dbo.sp_grant_login_to_proxy #proxy_name=N'My custom proxy', #fixed_server_role=N'sysadmin'
GO
-- assigning job step to run as a given proxy user
USE [msdb]
GO
EXEC msdb.dbo.sp_update_jobstep #job_id=N'0df2dac2-4754-46cd-b0bf-05ef65e1f87e', #step_id=1 , #subsystem=N'CmdExec',
#proxy_name=N'My custom proxy'
GO