I'm running Zabbix 2.2.5 and I'm trying to create a template with a couple of SNMP items.
I want to setup my template such that it uses the hostname macro within the SNMP OID, however no matter which macro I try and use I can't seem to get Zabbix to correctly resolve it.
An example of the SNMP OID I'm trying to query is:
NET-SNMP-EXTEND-MIB::nsExtendOutputFull.\"racka1-exhaust_temperature\"
Where the parent host of the item has the hostname: racka1.
Where I manually specify the OID already including the hostname as above to test, I successfully return a value.
When I set the OID as follows, I get problems:
NET-SNMP-EXTEND-MIB::nsExtendOutputFull.\"{HOST.NAME1}-exhaust_temperature\"
I've checked through the list of macro's and their usage locations but I can't judge which might cover SNMP OIDs, without looking through the source code.
I've got logging turned up to 4 in an effort to try and understand what is going on however I'm compounded in my testing by Zabbix setting the item to Not Supported and even though this check is set to run every 60 seconds, once I change the OID, I can't get Zabbix to quickly requeue the changed items.
Is it even possible to use a macro in a SNMP OID? If so which should I be using to mirror the hostname?
According to the linked documentation, under "Additional support for user macros" heading it says that user macros (the ones that look like {$MACRO}) are supported in SNMP OID field. However, {HOST.NAME}-like macros are not supported in SNMP OID and this can be confirmed by looking at the source code.
If you wish to have such support, please register a new ZBXNEXT.
Related
I need the DNS suffix of all my local interfaces on my PC.
Is there way how I can achieve this via Go?
Best case would be for any OS
Necessary: working on Windows
I have tried net.Inferfaces() and all the net commands but I haven't found anything regarding the DNS server.
EDIT
I have found the solution for the Windows-specific version but it would be interesting if there is anything that works for Linux and macOS too.
I don't think there is a solution that work for any OS. In Linux the DNS suffix is not interface specific but system wide, it is configured in /etc/resolv.conf. Here is an excerpt from the man page:
search Search list for host-name lookup.
By default, the search list contains one entry, the local domain name. It is determined from the local hostname returned by gethostname(2); the local domain name is taken to be everything after the first '.'. Finally, if the hostname does not contain a '.', the root domain is assumed as the
local domain name.
This may be changed by listing the desired domain search path following the search keyword with spaces or tabs separating the names. Resolver queries having fewer than ndots dots (default is 1) in them will be attempted using each component of the search path in turn until a match is found.
For environments with multiple subdomains please read options ndots:n below to avoid man-in-the-middle attacks and unnecessary traffic for the root-dns-servers. Note that this process may be slow and will generate a lot of network traffic if the servers for the listed domains are not local, and
that queries will time out if no server is available for one of the domains.
If there are multiple search directives, only the search list from the last instance is used.
The net package standard library parses this file to get the DNS config, so the DNS resolver should behave as expected, however, the parsing functionality is not exposed.
The libnetwork.GetSearchDomains func in the libnetwork library should be able to help you out. If there are no search entries in /etc/resolv.conf, you should use the hostname, which can be gotten with the os.Hostname func.
I believe this also works for FreeBSD and Mac OS since they are both "UNIX like". But I am not 100% sure.
I am trying to get the information of all the files related to an instance of ibm bpm but the following query does not work for me and there is no error in the javascript console either. I am using ECM Document List and in configuration I am adding a variable which contains the query.
"SELECT cmis:name, IBM_BPM_Document_FileNameURL,IBM_BPM_Document_UserId FROM IBM_ WHERE IBM_BPM_Document_ProcessInstanceId = 75774"
Thanks
I would assume that you are using and external ECM server and not the embedded ECM that comes along with IBM BPM/BAW.
Looking at the problem, I would approach the debugging in the following order;
Use a relevant ECM browser (ACCE in case of Filenet) to check if the
documents have a property that holds the value for the instanceID.
Because, by default external ECM servers don't have such a document
property.
If the document has such a property, then use that in the
"WHERE" clause of the query. If it doesn't then talk to whoever
maintains the ECM environment to create such a property and make
sure that is set properly (to the correct instanceId) for the
documents.
Another solution if you have access to it can be using the "BPM Document List" and "BPM File Uploader" which has the feature (as a configuration option) to associate documents with the current process instance.
I have a clustered NiFi setup (2-nodes) and have gotten Remote Process Groups to work when I explicitly list the IP address of one of the nodes in the RPG URL (http://:8080/nifi). The problem is with the use of RPG's in templates, I need to recreate these RPG's with the new node information for that cluster environment (Test->Stage->Prod). Is it possible to somehow use localhost as the address for this URL so that templates that include RPG's remain portable throughout environments?
I know this does not address your immediate question, but there is a JIRA that has been completed and tagged for the next release of NiFi which makes the RPG URL editable:
https://issues.apache.org/jira/browse/NIFI-4526
This would make it so that the value in your template doesn't really matter because you can change it after import.
I'm trying to create an OpenNMS alert when a certain folder ISN'T empty but can't seem to find a way of doing it. Any ideas?
I assume you have a service which goes down if your folder is empty. See the short video. By default notifications are turned off. Every service down event will be notified by default. You can be more granular by filtering on nodes and services. The default setting will send a mail to the admin user. You set a mail address in the user of the admin. To configure the access to your mail server, configure the javamail-configuration.properties. I just tried to figure out where you stuck exactly.
One approach could be to poll the certain directory for the empty condition with an agent on your host system and expose the status, e.g. Net-SNMP. You can create a service by using the SNMP Monitor to poll the status of the exposed OID and create a mail notification for this particular service.
Yes, this can be done. I have performed similar tasks using simple perl and bash scripts on Linux.
OpenNMS allows you to create polling configurations based on scripts. Your script is expected to output "0" or "1", with 0 representing "OK" and 1 representing "Not OK".
You could use the GeneralPurposePoller:
https://wiki.opennms.org/wiki/GeneralPurposePoller
However, it seems that you should instead use the SystemExecuteMonitor:
https://wiki.opennms.org/wiki/SystemExecuteMonitor
I am very new to SNMP and I need to get "system uptime" using our own enterprise OID.
I have already obtained an IANA number and created a MIB file.
The problem is when I use snmpget command with our OID, I get an object not found error at the command prompt.
Although when I do a snmptranslate on our object, I get the exact OID of that object.
If any additional information is required from my side, please let me know.
When you use snmpget, an SNMP request is made via IP to an SNMP agent on a remote (or local) host to return a specific piece of data. A MIB is used to describe in human readable terms, what that data is and where to find it. On the other hand, snmptranslate is a tool used to parse a given MIB. It parses a local MIB file, and doesn't make any contact with an agent.
Since you mentioned creating a new MIB, I assume your trying to add new functionality to an SNMP agent. To do this, the agent must be extended. If you're using Net-SNMP, there are a few options including compiling new source code into the agent, using a sub-agent, and using external scripts via pass and pass-persist protocol. Take a look at:
http://www.net-snmp.org
http://vincent.bernat.im/en/blog/2012-extending-netsnmp.html